Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1360
OUCH! Looks like WebDataGrid RowSelectionChanged is busted in 2011.1
posted

I create a DataTable in code with a single text column, I populate it with data. I assign the table to be the DataSource of a WebDataGrid and it displays OK. On the grid I have row selection enabled, CellClickAction=Row, RowSelectType=Single and AutoPostBack for RowSelectionChanged=True.

When selecting rows the event fires correctly and posts back to the server but the underlying grid is set to null:

protected void xmlGrid_RowSelectionChanged(object sender, Infragistics.Web.UI.GridControls.SelectedRowEventArgs e)
{
  GridRecord selectedRow = e.CurrentSelectedRows[0];
  string someText = selectedRow.Items[0].Value.ToString();
}

This crashes on the second row with a null value for SelectedRow but e.CurrentSelectedRows.Count is 1.

I has similar code that used to work in 2010.3. Am I doing something wrong or is this a bug in 2011.1?

Kind regards

Paul

ASP.NET CLR 4.0 VS 2010  2011.1