I get the above error for the following line of code.this.webdatagrid1.Behaviors.Selection.SelectedRows[i].Items[0].Value
I get the row count correctly, but I get a system.nullreferenceexception. I know for a fact that the values are not null.
Help me Infragistics gurus!!
public
{
rowcount =
Convert.ToInt32(this.WebDataGrid1.Behaviors.Selection.SelectedRows.Count);
selectedtools[i] =
Convert.ToInt32(this.WebDataGrid1.Behaviors.Selection.SelectedRows[i].Items[0].Value);
{sesstools = sesstools + selectedtools[i];
}
else
sesstools = sesstools + selectedtools[i] +
", ";
Enabling Cross page selection does not help. I continue to get the following line in the output 'System.NullReferenceException' occured in App_Web_5rv4keyr.dll.
This is not happening in a particular event, it's just function executed on button click. I've not enabled crosspageselection. Let me give that a shot.
Hang on.Thanks,Ashwin
The problem is especially evident after the virtual scrolling refresh happens. I'm using version 2011
Hi ashwinnayak86,
Which object is null? The selected row that is returned? Do you have EnableCrossPageSelection on? If that is the case and the selected row is not always returned if we cannot find a row in the Rows collection that matches the data key we have stored at that index. Which event was this happening in?
regards,David Young