When manually adding data to a grid, the first two columns go missing.
See attached Bitmap and code below.
I am simply adding data to a Grid through via a table.
I thought this was going to be simple, but has turned into something a little more challenging.
Any thoughts?
Thanks,
HH
See attached Bitmap and code below.
I am simply adding data to a Grid through via a table.
| DataTable dt = new DataTable(); |
| for (int i = 0; i < 5; i++) |
| dt.Columns.Add(new DataColumn("Col: " + i.ToString(), typeof(string))); |
| for (int i = 0; i < 5; i++) |
| { |
| DataRow dr = dt.NewRow(); |
| dt.Rows.Add(dr); |
| } |
| RadGrid1.DataSource = dt; |
| RadGrid1.Rebind(); |
| for (int i = 0; i < 5; i++) |
| for (int j = 0; j < dt.Columns.Count; j++) |
| RadGrid1.Items[i].Cells[j].Text = j.ToString(); |
Any thoughts?
Thanks,
HH