datagrid pageindex
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 first 6 records appearing and clicked on 2nd page 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.
now total record count is 6 and current pageindex should be 0. but it is not changing and pageindex remains 1 and I gotta error for this case.
"Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount."
Can anybody help?
Thanks
__________________
Rams
|