Paging problem in datagrid
-
hi all, paroblem as follows, i am using third party control for page navigation.the index of the datagrid current page index not matching with the third party control index.for example when i am deleting last record in second page i am able to bind with the first page. but if am deleting any record in first page it is throwing exception "Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount." the code as follows : this.dgUserList.CurrentPageIndex = this.dgnNav.CurrentPage; //Reset the page Navigation if deleting the only record on the last page. if (dgUserList.Items.Count <= 1 && dgUserList.CurrentPageIndex == dgUserList.PageCount - 1) { if (this.dgnNav.CurrentPage <= dgUserList.PageCount && this.dgnNav.CurrentPage > 0) { dgUserList.CurrentPageIndex = this.dgnNav.CurrentPage - 1; } } this is the page index of third party control this.dgnNav.CurrentPage; Thanks And Regards, Guru
-
hi all, paroblem as follows, i am using third party control for page navigation.the index of the datagrid current page index not matching with the third party control index.for example when i am deleting last record in second page i am able to bind with the first page. but if am deleting any record in first page it is throwing exception "Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount." the code as follows : this.dgUserList.CurrentPageIndex = this.dgnNav.CurrentPage; //Reset the page Navigation if deleting the only record on the last page. if (dgUserList.Items.Count <= 1 && dgUserList.CurrentPageIndex == dgUserList.PageCount - 1) { if (this.dgnNav.CurrentPage <= dgUserList.PageCount && this.dgnNav.CurrentPage > 0) { dgUserList.CurrentPageIndex = this.dgnNav.CurrentPage - 1; } } this is the page index of third party control this.dgnNav.CurrentPage; Thanks And Regards, Guru
Have you tried asking the makers of the third party control?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon