protected void DeluxePager1_CommonPageIndexChanged(object sender, EventArgs e) { DataSet ds = ObjData.GetPagerList(DeluxePager1.PageSize, DeluxePager1.PageIndex); int recordCount = ObjData.GetOrdersCount(); DeluxePager1.RecordCount = recordCount; DataList3.DataSource = ds; DataList3.DataBind(); }
private void InitializePage() { DeluxePager1.PageIndex = 0; DataSet ds = ObjData.GetPagerList(DeluxePager1.PageSize, DeluxePager1.PageIndex); int recordCount = ObjData.GetOrdersCount(); DeluxePager1.RecordCount = recordCount; DataList3.DataSource = ds; DataList3.DataBind(); }
private void InitializePage(int pageSize, int pageIndex) { DataSet ds = ObjData.GetPagerList(pageSize, pageIndex); int recordCount = ObjData.GetOrdersCount(); DeluxePager1.RecordCount = recordCount; int numrows; int numcells; int i = 0; int j = 0; int row = 0; int col = 0; TableRow r; TableCell c; //产生表格 numrows = pageSize; numcells = 5; for (i = 0; i < numrows; i++) { DataRow dr = ds.Tables[0].Rows[i]; r = new TableRow(); if (row / 2 != 0) { r.BorderColor = Color.Red; } row += 1; col = 1; for (j = 0; j < numcells; j++) { c = new TableCell(); c.Controls.Add(new LiteralControl(dr[col].ToString())); r.Cells.Add(c); col++; } Table1.Rows.Add(r); } r = new TableRow(); c = new TableCell(); c.Controls.Add(new LiteralControl("PRIORITY")); TableCell c1 = new TableCell(); c1.Controls.Add(new LiteralControl("集团")); TableCell c2 = new TableCell(); c2.Controls.Add(new LiteralControl("用户级别")); TableCell c3 = new TableCell(); c3.Controls.Add(new LiteralControl("创建用户")); TableCell c4 = new TableCell(); c4.Controls.Add(new LiteralControl("创建时间")); c.Width = Unit.Pixel(10); c1.Width = Unit.Pixel(60); c2.Width = Unit.Pixel(120); c3.Width = Unit.Pixel(120); c4.Width = Unit.Pixel(120); r.Cells.Add(c); r.Cells.Add(c1); r.Cells.Add(c2); r.Cells.Add(c3); r.Cells.Add(c4); Table1.Rows.AddAt(0, r); Table1.CellPadding = 2; Table1.CellSpacing = 2; Table1.BorderColor = Color.Blue; Table1.BackColor = Color.BlueViolet; DeluxePager1.BackColor = Color.BlueViolet; DeluxePager1.Width = Table1.Width; }