How can I access the the rows selected in a WebDataGrid on the server side?
For example, I have a WebDataGrid and I've enabled the Selection behavior fot it. I want the user to be able to select a row in the WebDataGrid then click a button which calls server side code to process the selected row (i.e. getting the values of some of the columns of the selected row).
I think I need to use the SelectedRowsCollection somehow, but not sure how to use it with my WebDataGrid.
Thanks,
John
this may be a other solution: in WebDataGrid You must set
EnableDataViewState="True" ViewStateMode="Enabled" AND Open selection option
<ig:Selection CellClickAction="Row" RowSelectType="Single" ....>
foreach (Infragistics.Web.UI.GridControls.GridRecord r in WebDataGrid1.Behaviors.Selection.SelectedRows) { if (r != null) {
XX = r.Items[WebDataGrid1.Columns["Name"].Index].Value.ToString(); //well be get Cell value or text
}