protected void grid_AfterExport() { DemoUCO uco = new DemoUCO(); DataTable dt = uco.GetUserData(); grid.DataSource = dt; grid.DataBind(); }
void DepartmentTree1_NodeOnClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e) { DemoUCO demoUCO = new DemoUCO(); lblTreeValue.Text = DepartmentTree1.SelectedDepartmentName; Grid1.DataSource = demoUCO.GetUserData(DepartmentTree1.SelectedDepartment); Grid1.DataBind(); UpdatePanel1.Update(); }
protected void grid_BeforeExport(object sender, Ede.Uof.Utility.Component.BeforeExportEventArgs e) { DemoUCO uco = new DemoUCO(); DataTable dt = uco.GetUserData(); dt.Columns[0].Caption = "帳號"; dt.Columns[1].Caption = "姓名"; dt.Columns.RemoveAt(2); e.Datasource = dt; }
private void BindGrid() { DemoUCO uco = new DemoUCO(); DataTable dt = uco.GetUserData(); if (ViewState["sort_self"] == null) { ViewState["sort_self"] = "ACCOUNT"; } dt.DefaultView.Sort = (string)ViewState["sort_self"]; grid.DataSource = dt; grid.DataBind(); }