Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

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)

Posted
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

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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...