private void CreateGridView(Control container) { using (MixERPGridView grid = new MixERPGridView()) { grid.ID = "SalesByGeographyGridView"; grid.CssClass = "initially hidden"; grid.DataSource = SalesByGeography.GetSalesByCountry(); grid.DataBind(); container.Controls.Add(grid); } }
private void AddGrid(string cultureCode) { string cultureName = new CultureInfo(cultureCode).NativeName; this.CultureLiteral.Text = string.Format("<h2 class='ui red header'>{0}</h2>", cultureName); using (MixERPGridView gridView = new MixERPGridView()) { gridView.ID = "LocalizationGridView"; gridView.CssClass = "ui table initially hidden"; gridView.DataSource = Factory.Get <DbGetLocalizationTableResult>("SELECT * FROM localization.get_localization_table(@0::text) ORDER BY row_number;", cultureCode); gridView.DataBind(); this.Placeholder1.Controls.Add(gridView); } }
private void LoadGrid(string indices, string styles) { List <string> styleList = styles.Split(',').ToList(); int counter = 0; foreach (string data in indices.Split(',')) { string style = styleList[counter]; string ds = data.Trim(); if (!string.IsNullOrWhiteSpace(ds)) { int index = Conversion.TryCastInteger(ds); using (MixERPGridView grid = new MixERPGridView()) { grid.EnableTheming = false; grid.ID = "GridView" + ds; grid.CssClass = "report"; grid.Width = Unit.Percentage(100); grid.GridLines = GridLines.None; grid.RowDataBound += this.GridView_RowDataBound; grid.DataBound += this.GridView_DataBound; this.gridPlaceHolder.Controls.Add(grid); grid.DataSource = this.dataTableCollection[index]; grid.DataBind(); if (!string.IsNullOrWhiteSpace(style)) { grid.Attributes.Add("style", style); } } counter++; } } }