Since there is not RadListbox, I have started to use RadGrid in its place.
I have a need to programmatically access the value of a particular grid item. All of the client-settings are enabled to allow for a selectedindexchanged event. There is a series of 5 grids that are programmatically built based on the selection in the previous grid.
The first grid is bound to a simple List<string>.
I have a need to programmatically access the value of a particular grid item. All of the client-settings are enabled to allow for a selectedindexchanged event. There is a series of 5 grids that are programmatically built based on the selection in the previous grid.
The first grid is bound to a simple List<string>.
// Grid Code
rgDailyBuilds.DataSource = oDailyBuildFolder.DailyBuilds.ToList<
string>();
rgDailyBuilds.DataBind();
On the selected index change, I need to access the value of the grid item that was selected. Currently, I only allow for single select but in the future I will allow multiple select. That said, I started to approach it like this:
// Grid Code
GridItemCollection oGic = rgDailyBuilds.SelectedItems;
string sValue = string.Empty;
foreach (GridDataItem o in oGic)
sValue =
Convert.ToString(o.GetDataKeyValue("Item"));
But didn't get far. How can I access the values? Also, what if the grid contained more than one column. How would I retrieve the value from a single column of a row?
Thanks,
Jim