I have a datagrid with paging support. I am showing the results in a datagrid based on the filter condition. I have filtered the data and now has 2 pages. When I go to the second page, I again perform a search function to narrow the results. Then I get an error like
"Invalid CurrentPageIndex value. It must be> = 0 and <PageCount + datagrid paging"
, , . ?
:
CurrentPageIndex. >= 0 < PageCount.
protected void btnSearchLibrary_Click(object sender, EventArgs e)
{
if(!String.IsNullOrEmpty(txtSearchLibraryNo.Text.Trim()))
oBookReceiptDTO.LibraryCardNo = txtSearchLibraryNo.Text.Trim();
gvBooksReceiptList.CurrentPageIndex = 0;
FillGridViewBookReceiptList(oBookReceiptDTO);
}
: gvBooksReceiptList.CurrentPageIndex = 0; , .