Shankey
posted
178 posts
since
Aug 05, 2010
from
|
|
Re: Error : Object reference not set to an instance of an object.
|
|
|
|
|
|
|
|
|
|
|
Hi jagadeesh,
I think this is your javascript error and check whether you are able to get you check box through javascript. like this document.getElementById('chkbox.ClientID')
|
|
|
|
|
If this post helped you, then tick the checkbox above "Do you like this Answer"
Shakey Shankey
|
|
|
|
|
|
Suthish Nair
posted
4906 posts
since
Jul 09, 2009
from
India
|
|
Re: Error : Object reference not set to an instance of an object.
|
|
|
|
|
|
|
|
|
|
|
put a breakpoint on this line
array.Contains(grideviewsasmple.DataKeys[i].Value);
and check the values its getting..
Please Mark as Answer, if your post solved !
|
|
|
|
|
|
Sam Hobbs
posted
6490 posts
since
Sep 07, 2009
from
Los Angeles, California, USA
|
|
Re: Error : Object reference not set to an instance of an object.
|
|
|
|
|
|
|
|
|
|
|
Do as Suthish Nair says. It is what you should do to diagnose problems such as this. To solve the problem, you could put code in your program to check if grideviewsasmple.DataKeys[i] is null. I think it will be null for the last row, which is the rows for new records. I think you can use the NewIndex (I am not sure what it is called) property to determine if a row is the row for a new row.
|
|
|
|
|
Thinking is a feeling; pleasant for some and unpleasant for others.
|
|
|
|
|
|