ListView with DataPager not working

后端 未结 7 908
[愿得一人]
[愿得一人] 2021-02-07 05:00

From everything I\'ve read, it seemed that adding paging to a ListView control should be dead simple, but it\'s not working for me. After adding the ListView and DataPager contr

7条回答
  •  借酒劲吻你
    2021-02-07 05:36

    try this:

    protected void ListView1_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
    {
        DataPager1.SetPageProperties(e.StartRowIndex, e.MaximumRows, false);
        ListView1.DataSource = productList;
        ListView1.DataBind();
        DataPager1.DataBind();
    }
    

提交回复
热议问题