How would I convert List<List<string>>
to a DataTable
? I am trying to set the DataSource
of a gridview to a List<List<string>>
variable.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Carriage Return (ASCII chr 13) is missing from tex
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
This can easily be done using extension methods.
Add this class to your solution
then use the extension method like this:
I would rather set DataSource of the grid to BindableList, which you would perhaps create easier, instead of double nested List, you would have List of Rows (where the Row is business entity represented, for example Customer).