hi!
in my datagrid i give paging. i.e., one page contain 10 rows. and 11th row onwards it dispaly 2nd page.
my problem is when i delete all records in a datagrid page means 2nd page contains a 11 to 20 rows. if i deletes the 2nd page all records. all Records are deleted but it shows a error in this line datagrid1.databind().
"Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount."
how to solve this error. please give reply.
Thanks
Loading
Dipa AhujaPosted Apr 17, 2010, 7:18 AM
ajay rajuPosted Apr 17, 2010, 1:17 AM
i am already write that code. my problem is when i delete 2nd page or 3rd page... all records. that time error occured in runtime. that error message is "Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount." this occur in this line datagrid1.databind().
i think this is enough to explain my problem. please give a proper code.
Thanks.
Dipa AhujaPosted Apr 16, 2010, 8:36 AM
ajay rajuPosted Apr 16, 2010, 7:36 AM
i am using Datagrid but u give GridView code. in datagrid PageIndexChanged Event only Displayed. please give a for Datagrid.
Thanks
Dipa AhujaPosted Apr 16, 2010, 7:20 AM
ajay rajuPosted Apr 16, 2010, 12:56 AM
i am code behind and
Protected Sub DataGrid1_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles dg_Viewcontacts.PageIndexChanged
Thanks.
Dipa AhujaPosted Apr 15, 2010, 10:55 AM