void SetControl(DevExpress.XtraGrid.GridControl c) { c.SuspendLayout(); c.BeginInit(); foreach (DevExpress.XtraGrid.Views.Grid.GridView gv in c.Views) { foreach (DevExpress.XtraGrid.Columns.GridColumn col in gv.Columns) { col.Caption = rm.GetString(string.Concat(col.Name, ".Caption"), culture); col.ToolTip = rm.GetString(string.Concat(col.Name, ".ToolTip"), culture); } } c.EndInit(); c.ResumeLayout(); }
void SetControl(DevExpress.XtraGrid.GridControl gridControl) { gridControl.SuspendLayout(); gridControl.BeginInit(); foreach (DevExpress.XtraGrid.Views.Grid.GridView gridView in gridControl.Views) { if (ui_captionsList_ContainsKey("GroupPanelText")) { var v = ui_captionsList_get("GroupPanelText"); gridView.GroupPanelText = v.TextValue; } foreach (DevExpress.XtraGrid.Columns.GridColumn gridColumn in gridView.Columns) { if (gridColumn.Tag != null) { if (!string.IsNullOrEmpty(gridColumn.Tag.ToString().Trim())) { if (ui_captionsList_ContainsKey(gridColumn.Tag.ToString())) { var v = ui_captionsList_get(gridColumn.Tag.ToString()); gridColumn.Caption = v.TextValue; gridColumn.ToolTip = v.TooltipValue; } } } } } gridControl.EndInit(); gridControl.ResumeLayout(); }