Author: icm63 | Posted on: 8/16/2009 5:52:01 PM | Views : 489

 SET UP
I have an obout.grid (me.gridsettings1) on a user control that loaded onto a aspx page.
Within a method on the user control, I run thru selected records like this..to get a data item , thats is an integer.
 
Private Function getSelectedRowUserGroupID() As Integer Dim s As Integer If Me.gridSettings1.SelectedRecords.Count > 0 Then 'HERE For Each rec As Hashtable In Me.gridSettings1.SelectedRecords s = CInt(rec("UserGroupID").ToString) Next Me.gridSettings1.SelectedRecords.Clear() End If Return s End Function

 It works fine for about 1 or 2 times then asp.net throws up this error : System.NullReferenceException: Object reference not set to an instance of an object.

Go to the complete details ...