当ListView控件在后台绑定数据源时,用DataPager控件分页需要注意的问题

当ListView控件在后台绑定数据源时,即不用SqlDataSource做数据源,
再利用DataPager分页的时候,要调用一下方法:
   
    /// <summary>
    /// ListView分页出发事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void ListView1_PagePropertiesChanged(object sender, EventArgs e)
    {
        DataPager1.SetPageProperties(list_DataPager.StartRowIndex, 16, true);
        Bind();  //再次调用自己定义的绑定数据源方法
    }

posted @ 2011-01-23 21:13  王福朋  阅读(1388)  评论(0编辑  收藏  举报