mike55 Posted August 10, 2004 Posted August 10, 2004 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 Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
Moderators Robby Posted August 10, 2004 Moderators Posted August 10, 2004 Is the Infragistics.webui.ultrawebgrid created at run-time? Also, you should change 'Dim row as string' to 'Dim row as Integer' Quote Visit...Bassic Software
mike55 Posted August 11, 2004 Author Posted August 11, 2004 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 Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
Moderators Robby Posted August 12, 2004 Moderators Posted August 12, 2004 Cool, as long as it works now. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.