Hi all !
I'm using the UltraGrids built-in ui ColumnChooserControl.
Now, how can I change the controls header "Field Chooser" ?
My UltraGrid code looks like this:
private void DefaultInitializeLayout(InitializeLayoutEventArgs e){ e.Layout.Override.RowSelectors = DefaultableBoolean.True; e.Layout.Override.RowSelectorHeaderStyle = RowSelectorHeaderStyle.ColumnChooserButton; }
private void DefaultBeforeColumnChooserDisplayed(BeforeColumnChooserDisplayedEventArgs e) { e.Dialog.Size = new Size(250, 250); e.Dialog.DisposeOnClose = DefaultableBoolean.False; e.Dialog.ColumnChooserControl.MultipleBandSupport = MultipleBandSupport.SingleBandOnly; e.Dialog.ColumnChooserControl.Style = ColumnChooserStyle.AllColumnsWithCheckBoxes; e.Dialog.ColumnChooserControl.SyncLookWithSourceGrid = false; e.Dialog.ColumnChooserControl.DisplayLayout.GroupByBox.Prompt = "Zeilen ein-/ausschalten"; }
Trying to change the controls header via
e.Dialog.ColumnChooserControl.DisplayLayout.GroupByBox.Prompt= "Some string";
doesn't work.
Any hint or idea is very welcome !
Thanks in advance,
Claus
Hi Claus,
The text you are referring to has nothing to do with the GroupByBox, it's the text of the dialog.
private void ultraGrid1_BeforeColumnChooserDisplayed(object sender, BeforeColumnChooserDisplayedEventArgs e) { e.Dialog.Text = "Some string"; }
But if you are trying to localize the strings in your application, you are better off using the ResourceCustomizer. For example, you could do this in Form_Load and it will affect all of the grids in your application.
Infragistics.Win.UltraWinGrid.Resources.Customizer.SetCustomizedString("ColumnChooserDialogCaption", "Some String");