I'm trying to bind data from a two-dimensional List structure to a grid but its not working out. This is what I'm trying to do in the NeedDataSource event for my grid:
I'm hoping to get output that looks like:
testing1 testing2
testing3 testing=42
Instead I get:
Can anyone tell me how I can do something like this without using a DataSet or DataReader?
| List<List<object>> rows = new List<List<object>>(); |
| List<object> list1 = new List<object>(); |
| list1.Add("testing1"); |
| list1.Add("testing2"); |
| List<object> list2 = new List<object>(); |
| list2.Add("testing3"); |
| list2.Add("testing=42"); |
| rows.Add(list1); |
| rows.Add(list2); |
| radGrid.DataSource = rows; |
I'm hoping to get output that looks like:
testing1 testing2
testing3 testing=42
Instead I get:
| Capacity | Count |
|---|---|
| 4 | 2 |
| 4 | 2 |
Can anyone tell me how I can do something like this without using a DataSet or DataReader?