cyberdeminout
Programmer
I have datagrid (total records 7) and pagesize is 6 and pager style is numeric and two columns (name column and checkbox column and all are checked)
by default, currentpageindex is 0 and 1st page have first 6 records appearing and clicked on 2nd page(pageindex 1) and it shows 7th record. when uncheck 7th checkbox(2nd page) and click on save button, saving user selection to Database and populating grid again(It saves Perfectly).
now total record count is 6 and current pageindex should be 0. but page index is not changing and remains 1 and I gotta error for this case.
"Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount."
Can anybody help?
Thanks
by default, currentpageindex is 0 and 1st page have first 6 records appearing and clicked on 2nd page(pageindex 1) and it shows 7th record. when uncheck 7th checkbox(2nd page) and click on save button, saving user selection to Database and populating grid again(It saves Perfectly).
now total record count is 6 and current pageindex should be 0. but page index is not changing and remains 1 and I gotta error for this case.
"Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount."
Can anybody help?
Thanks