I would like to populate a grid the same way that I populate a combo box using datarows from a dataset
The following is the code that I use to populate my combo boxes
How would I populate a grid.
I thought I could do something like the following.
Of course this does not work.
Again I would like to fill in the grid one row at a time.
FYI: This grid contains three columns and could have as many as 200 rows.
I am looking to do this at the PreRender event.
Thanks
The following is the code that I use to populate my combo boxes
using (DataSet dsDept = WSAccess.StepsGlobal_GetCodeTable("codDepartments")){ if (Globals.IsValidDataSet(dsDept)) { foreach (DataRow row in dsDept.Tables[0].Rows) { RadComboBoxItem rcbi = new RadComboBoxItem(row["DESC"].ToString(), row["ID"].ToString()); combo.Items.Add(rcbi); } }}How would I populate a grid.
I thought I could do something like the following.
using (DataSet dsDept = WSAccess.StepsGlobal_GetCodeTable("codDepartments")){ if (Globals.IsValidDataSet(dsDept)) { foreach (DataRow row in dsDept.Tables[0].Rows) {>>>>>> RadGridItem rcbi = new RadGridItem(row["DESC"].ToString(), row["ID"].ToString());>>>>>> RadGrid.Items.Add(rcbi); } }}Again I would like to fill in the grid one row at a time.
FYI: This grid contains three columns and could have as many as 200 rows.
I am looking to do this at the PreRender event.
Thanks