Hi, I'm trying to set the character casing on a UltraTreeNodeColumn to upper case. Any suggestiong? One of the columns is just plain text and the other I'm using a UltraDropDown. Thanks
Hello ehan,
I am glad to hear this!
Please feel free to let me know if a question about our tool set comes up on your mind.
I've moved over to the UltraCombo and now it works. Thanks
Hi,
I don't see you setting the ValueMember here. Is the DisplayMember and the ValueMember the same column? By default, the ValueMember will resolve to the first column, so if your codeColumn is the first one, then the dropdown isn't really translating the value into display text.
Does the text on the code column show up in upper case?
Does the value in the node cell match a value on the dropdown?
If this is not working, then another approach you could take is to use an UltraCombo instead of an UltraDropDown. They both derive from the same base class, so all you could pretty much find/replace UltraDropDown with UltraCombo in this code with two small changes:
1) Set the EditorComponent on the column instead of the ValueList:
treeColumn.EditorComponent = BenchmarkCombo;
2) Set the CharacterCasing on the UltraCombo just like on the UltraTextEditor.
Thanks Mike, I got the column with the text box to work with your suggestion. But I'm still having trouble with the drop down. Below is the code
BenchmarkDropDown = new UWG.UltraDropDown();UWG.UltraGridColumn idColumn = new UWG.UltraGridColumn("ID");idColumn.Hidden = true;idColumn.Header.VisiblePosition = 0;UWG.UltraGridColumn codeColumn = new UWG.UltraGridColumn("Code");codeColumn.Header.VisiblePosition = 1;codeColumn.CharacterCasing = CharacterCasing.Upper;UWG.UltraGridColumn descriptionColumn = new UWG.UltraGridColumn("Description");descriptionColumn.Header.VisiblePosition = 2;((ISupportInitialize) BenchmarkDropDown).BeginInit();BenchmarkDropDown.DataMember = null;BenchmarkDropDown.DisplayMember = "Code";BenchmarkDropDown.DisplayLayout.Bands[0].Columns.AddRange(new object[] { idColumn, codeColumn, descriptionColumn });BenchmarkDropDown.Visible = false;BenchmarkDropDown.MaxDropDownItems = 8;BenchmarkDropDown.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;BenchmarkDropDown.DisplayLayout.ScrollStyle = UWG.ScrollStyle.Immediate;BenchmarkDropDown.DisplayLayout.AutoFitStyle = UWG.AutoFitStyle.None;BenchmarkDropDown.TextRenderingMode = TextRenderingMode.GDI;((ISupportInitialize) BenchmarkDropDown).EndInit();BenchmarkComboItems = new ComboItemList();BenchmarkDropDown.SetDataBinding(BenchmarkComboItems.BindingSource, "", true, true);BenchmarkDropDown.DisplayLayout.BorderStyle = UIElementBorderStyle.Solid;BenchmarkDropDown.DisplayLayout.Override.CellAppearance.BackColor = RockitColors.GridDropDownBackground;BenchmarkDropDown.DisplayLayout.Override.BorderStyleCell = UIElementBorderStyle.Dotted;BenchmarkDropDown.DisplayLayout.Override.BorderStyleRow = UIElementBorderStyle.Dotted;
treeColumn = new UltraTreeNodeColumn();treeColumn.Key = BenchmarkColumnKey;treeColumn.Text = "Benchmark";treeColumn.AllowCellEdit = AllowCellEdit.Full;treeColumn.LayoutInfo.AllowLabelSizing = LayoutSizing.None;treeColumn.MaxLength = 4;treeColumn.ButtonDisplayStyle = Infragistics.Win.UltraWinTree.ButtonDisplayStyle.OnCellActivate;treeColumn.ValueList = BenchmarkDropDown;treeColumnSet.Columns.Add(treeColumn);
The UltraTreeNodeColumn doesn't expose a CharacterCasing property like the UltraGridColumn does, but you can still achieve what you want using an editor.
What you do is place an UltraTextEditor control on the form and set it's CharacterCasing to Upper. Then set the EditorComponent property on the column to the UltraTextEditor. The ColumnSetGenerated event might be a good place to do this - depending on when and how your ColumnSets are being created.
For the UltraDropDown column, the best thing to do would be to simply set CharacterCasing on the DisplayMember column of the UltraDropDown to Upper.