0

hello ,
i am getting error on it , object refrence is not set to an instance of an object ,
my code is

  if (dgvBlockSites.Rows[j].Cells[1].Value.ToString() != "-1")
                    {
                    //-------------- some code here
                    }

i dont know what is wrong with it , i have 4 or 5 rows in my grid , it give above mentioned error .
do any one has any idea how to deal with it ?

Regards

3
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by waqassilat
0

May be you .Value property is null kindly check it in QuickWatch..

Edited by pritaeas: Fake signature removed

0

Hi sorry for bother its just link of site here not solution define.solution is that who i define in my post that

May be your .Value property is null kindly check it in QuickWatch

and second thing is that are you using this code on CellValidating event of grid view?

Edited by pritaeas: Do not mention, plug or refer to any product, service, or website you are affiliated with anywhere outside of Business Exchange forums. Please read our member rules. I this continues you will be infracted.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.