Hello
The following code is supposed to place an editor control of type UltraNumericEditor on the single node that it has. However, it does not work.
Can you please tell what is wrong?
Thanks a lot.
With Me.UltraTree1 .ViewStyle = Infragistics.Win.UltraWinTree.ViewStyle.OutlookExpress With .ColumnSettings .RootColumnSet.Columns.Add("TestColumn") .AutoFitColumns = Infragistics.Win.UltraWinTree.AutoFitColumns.ResizeAllColumns End With With .Override .ShowEditorButtons = Infragistics.Win.UltraWinTree.ShowEditorButtons.Always .EditorControl = UltraNumericEditor1 End With With .Nodes .Add("FirstNode") End With End With
You should probably take a look at the 'UltraTree PropertyGrid' sample that ships with the product; the sample was written before the ability to edit cells was added, but to enable cell editing you can set the ColumnSettings.AllowCellEdit property (you might also want to set Override.CellClickAction if you want cells to enter edit mode on a MouseDown).
Regarding the exception you were getting when embedding the UltraNumericEditor: that control only supports the Integer and Double data types, so you can't embed that editor in a column of some other data type.
I am still having problems setting the editor. Please, allow me to explain what I intend to do: - I want to configure the Tree with 2 columns ("Property" and "Value") - Only cells of the second column can be edited - Each cell can have a different kind of editor So far, I cannot get the tree to have editable cells.
Any ideas?
Thanks. I tried but this exception is raised: "The Owner specified a type to EditorWithMask that is not supported by the editor."
By the way, the code of my previous post implies that a new Tree control is placed on the form with no modifications, and that a NumericEditor is also placed (styled with an Office 2007 look). You can see in the code that a single column and a single node is added.
When running under the OutlookExpress view style, you must assign the editor provider to the EditorControl property of the column in which you want the editor to display.
Example:
this.tree.ColumnSettings.RootColumnSet.Columns["EditorColumn"].EditorControl = this.ultraNumericEditor;