Hello,
I have a datagrid on a webform that I repopulate based on user input on the form. The problem is that sometimes when I repopulate the grid it errors on my databind property with this error...
***
Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.
***
This is the code I execute each time I repopulate my grid. The strSQL string is different based on the user input.
***
With DataGrid1
.DataSource = CreateDataSet(strSQL)
.DataBind()
End With
***
The only thing I think it may be is that the grid somehow needs to be reset before I repopulate it in order to have the correct currentpageindex value. Any help on this would be appreciated.
Thanks,
FoxT
I have a datagrid on a webform that I repopulate based on user input on the form. The problem is that sometimes when I repopulate the grid it errors on my databind property with this error...
***
Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.
***
This is the code I execute each time I repopulate my grid. The strSQL string is different based on the user input.
***
With DataGrid1
.DataSource = CreateDataSet(strSQL)
.DataBind()
End With
***
The only thing I think it may be is that the grid somehow needs to be reset before I repopulate it in order to have the correct currentpageindex value. Any help on this would be appreciated.
Thanks,
FoxT