I have a jagged array of strings in C#.
How do I bind it to a DataGrid such that I can see the contents of the array?
Currently in the DataGrid, instead of the array’s contents, I see a column that says “Length”, “Long Length”, “Rank”, “SyncRoot”, etc…basically, properties of the array and not the contents of the array.
My code:
string[][] jagged = new string [100][];
//...jagged array is populated...
dataGridView1.DataSource = jagged;
Here is an example that you can try following I didn’t do this with String[] but you can get the Idea
For String[][] here is an example
using LinQ look at this
USING LINQ for Multi Denensional Array