Prob with Object Reference

mike55

Contributor
Joined
Mar 26, 2004
Messages
727
Location
Ireland
Hi

Am getting the following error:
Object Reference not set to an instance of an object
The component that i am using is a ultrawebgrid (basically a nice looking datagrid) where you can click on each individual row.

What i am doing is when you double click on a row, then i get the row number and then i will get the actual reference number at the start of that row.

The code that i am using to handle the double click event is:
private sub webgrid_DblClick(ByVal sender as object, ByVal e as Infragistics.webui.ultrawebgrid.clickeventagr) handles webgrid.DblClick
Dim row as string
row = e.row.index
label1.text = webgrid.rows(row).cells(0).tostring
end sub

In case you have any doubt about the code, it works grand, i.e. it does what it has to do in another project. Didn't do anything different in this project. Would appreciate it if ye could have a look and suggest some reasons why the object ref is acting up.

Mike
 
Is the Infragistics.webui.ultrawebgrid created at run-time?

Also, you should change 'Dim row as string' to 'Dim row as Integer'
 
Robby said:
Is the Infragistics.webui.ultrawebgrid created at run-time?

Also, you should change 'Dim row as string' to 'Dim row as Integer'

Just after taking all my code and moving it to a different page, it works perfectly...don't know what is wrong on the other page. In relation to the data type of 'row', i had changed that to an interger after placing the first posting, while in relation to the Infragistics.webui.ultrawebgrid being created at run time, well that is correct.

Mike
 
Back
Top