0

While writing the code below I encountered this error saying ListViewPageEventsArgs could not be found.

enter image description here

I have already added the code below to the template :

OnPageIndexChanging="lvListScreen_PageIndexChanging"

Do you guys know why I'm having this error?

CDspace
  • 2,639
  • 18
  • 30
  • 36
Vivek Puri
  • 43
  • 1
  • 7
  • I don't know where you got that snippet from, but a ListView does not have `OnPageIndexChanging`, but `OnPagePropertiesChanging`. – VDWWD Jul 11 '17 at 15:29
  • Thanks . I added as per your advice protected void lvListScreen_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e) { (lvListScreen.FindControl("CustomPager1") as controls_CustomPager).SetPageProperties(e.StartRowIndex, e.MaximumRows, false); this.BindListScreenView(Convert.ToInt32(Request.QueryString["pg"])); } – Vivek Puri Jul 12 '17 at 04:07
  • Hello now only problem I have is whenever I change my page size from DDL I loose my page start index calculation which is Convert.ToString((miCurrIndex * Convert.ToInt32 (ddlPageSize.SelectedValue))-10 + 1); – Vivek Puri Jul 13 '17 at 06:03

0 Answers0