Dear All,
I have a radgrid on one of my UserControls that I need to display data.
1: Data grid needs to show three columns with no data when the usercontrol is loaded.
I put this code in the page_load of the usercontrol:
BUT the grid doesn't show anything when loaded, If I put the previous code in the Need_DataSource event it shows the columns.
2: I have a button on the usercontrol that will fill the grid with data, where I create a datatable and fill with data as follows:
I get an exception "Input array is longer than the number of columns in this table."
What is wrong with this, can someone help
Best regards
Waleed
I have a radgrid on one of my UserControls that I need to display data.
1: Data grid needs to show three columns with no data when the usercontrol is loaded.
I put this code in the page_load of the usercontrol:
| DataTable dt = new DataTable(); |
| dt.Columns.Add("Source", typeof(string)); |
| dt.Columns.Add("Value", typeof(string)); |
| IdentifiersGrid.DataSource = dt; |
2: I have a button on the usercontrol that will fill the grid with data, where I create a datatable and fill with data as follows:
| dt.Rows.Add(ids[0].Value, ids[1].Value); |
What is wrong with this, can someone help
Best regards
Waleed