private static FG_DataGrid GetDataGridGlobal(EbDataGrid DG, SingleTable Table, SingleRow RowModel) { List <FG_Row> Rows = new List <FG_Row>(); Dictionary <string, object> Metas = null; foreach (SingleRow Row in Table) { if (Row.IsDelete) { continue; } FG_Row fG_Row = new FG_Row() { id = Convert.ToInt32(Row[FormConstants.id]) }; foreach (EbControl _control in DG.Controls) { if (_control is EbDGPowerSelectColumn) { Metas = new Dictionary <string, object>() { { FG_Constants.Columns, Row.GetColumn(_control.Name).R } } } ; else { Metas = null; } fG_Row.Controls.Add(new FG_Control(_control.Name, _control.ObjType, Row[_control.Name], Metas)); } Rows.Add(fG_Row); } FG_Row fG_RowModel = new FG_Row(); foreach (EbControl _control in DG.Controls) { if (_control is EbDGPowerSelectColumn) { Metas = new Dictionary <string, object>() { { FG_Constants.Columns, RowModel.GetColumn(_control.Name).R } } } ; else { Metas = null; } fG_RowModel.Controls.Add(new FG_Control(_control.Name, _control.ObjType, RowModel[_control.Name], Metas)); } return(new FG_DataGrid(DG.Name, Rows, fG_RowModel)); }
public _FG_DataGrid(EbDataGrid CtrlObj, SingleTable Table) { this.Name = CtrlObj.Name; this.CtrlObj = CtrlObj; this.Table = Table; }