private void BindGrid() { this.serviceElementsDS = (CMS.ServiceElementsDS)Session["ElementDs"]; this.gridView.Table = this.serviceElementsDS.Element; try { gridView.RowFilter = "ParentElementId =" + this.ViewState["ThisMonth"].ToString(); } catch { gridView.RowFilter = "ParentElementId is null"; } this.grdElements.DataBind(); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.serviceElementsDS = new CMS.ServiceElementsDS(); this.gridView = new System.Data.DataView(); ((System.ComponentModel.ISupportInitialize)(this.serviceElementsDS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView)).BeginInit(); this.lnkTop.Click += new System.EventHandler(this.lnkTop_Click); this.lnkUp.Click += new System.EventHandler(this.lnkUp_Click); // // serviceElementsDS // this.serviceElementsDS.DataSetName = "ServiceElementsDS"; this.serviceElementsDS.Locale = new System.Globalization.CultureInfo("en-US"); // // gridView // this.gridView.AllowDelete = false; this.gridView.AllowEdit = false; this.gridView.AllowNew = false; this.Load += new System.EventHandler(this.Page_Load); this.PreRender += new System.EventHandler(this.PreRender_Handler); ((System.ComponentModel.ISupportInitialize)(this.serviceElementsDS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridView)).EndInit(); }