0

I have a problem in my work. This is my detail problem:

I have 2 aspxgridview, A using SQL to load data and B aspxgridview is use for copy some item from A to B by rowselecting, in my B aspxgridview, each rows have an checkbox which user can check it. My problem is, when in my B gridview have paging with limit 10 when 11st item, aspxcheckbox in the next paging can't detect as object. So, I can't get that value to insert it to my database. this is my screenshot. if anyone know how to fix it, I hope u can help my problem thank you. My Sample Page My Error Page

M. Adeel Khalid
  • 1,770
  • 2
  • 21
  • 24
  • 1
    Possible duplicate of [What is a NullReferenceException, and how do I fix it?](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – Tetsuya Yamamoto Feb 08 '17 at 03:06
  • my problem not like as that. my problem is i cant detect my checkbox object in my aspxgridview when the item is in the next paging. i will describe more detail, first, when i have aspxgridview with 10 show limit data, its work normally for insert that checkbox value to database. second, because only show 10 data, automatically the 11st item will be in the next paging. nah, my problem, the checkbox object cannot detect as object. by the way, this is webform problem. – NubieSeth Feb 09 '17 at 02:03

2 Answers2

0

Have you checked the Value of cbakses? It's probably null.

mindOfAi
  • 4,046
  • 2
  • 14
  • 25
  • the value of cbakses actually no matter if its have null value. my problem is i cant detect my checkbox object in my aspxgridview when the item is in the next paging. – NubieSeth Feb 09 '17 at 01:58
0

ASPxGridView Datasource will be null on each round trip. If you click next page, that gridview lost its datasource. Hence you got null reference.