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 AhujaRank #1,168 · 1.5K reputationPosted Apr 15, 2010, 6:55 AM EDT
ajay rajuRank #4,639 · 333 reputationPosted Apr 15, 2010, 8:56 PM EDT
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 AhujaRank #1,168 · 1.5K reputationPosted Apr 16, 2010, 3:20 AM EDT
ajay rajuRank #4,639 · 333 reputationPosted Apr 16, 2010, 3:36 AM EDT
i am using Datagrid but u give GridView code. in datagrid PageIndexChanged Event only Displayed. please give a for Datagrid.
Thanks
Dipa AhujaRank #1,168 · 1.5K reputationPosted Apr 16, 2010, 4:36 AM EDT
ajay rajuRank #4,639 · 333 reputationPosted Apr 16, 2010, 9:17 PM EDT
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 AhujaRank #1,168 · 1.5K reputationPosted Apr 17, 2010, 3:18 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts