DataTable newdt = new DataTable();
newdt = DataSetHelper.Join(ds.Tables["Unit"], ds.Tables["Location"], new DataColumn[] { ds.Tables["Unit"].Columns["Location_Id"] }, new DataColumn[] { ds.Tables["Location"].Columns["Location_Id"] }, "locationName");
DataView dv = ds.Tables["Unit"].DefaultView;
Repeater.DataSource = dv;
Repeater.DataBind();
现在所有结果都显示在一个页面上, 我想把它改成不同的页面。
我该怎么做?请帮忙
dv.Sort = SortList.SelectedValue.ToString();
PagedDataSource page = new PagedDataSource();
page.DataSource = dv; page.AllowPaging = true;
// page.PageSize = Int32.Parse(ResultList.SelectedValue); page.PageSize = 10;
page.CurrentPageIndex = CurrentPage; lblCurrentPage.Text = "Page: " + (CurrentPage + 1).ToString() + " of " + page.PageCount.ToString();
cmdPrev.Enabled = !page.IsFirstPage;
cmdNext.Enabled = !page.IsLastPage; invList.DataSource = dv; invList.DataBind();