Hello.
I am trying to create a tree where each node has an UltraNumericEditor column and a Label column. It's for "Quantity" and "Description", respectively. I'm having a hell of a time.
I am getting an error when adding the UltraNumericEditor.
Here's my code:
uTreeOptions.ViewStyle = ViewStyle.FreeForm Dim rootColumns As New UltraTreeColumnSet() rootColumns.Columns.Add("Qty") rootColumns.Columns.Add("Description") For Each row As DataRow In _dtOptions.Rows Dim _key As String = row("ContractSequence").ToString.Trim() Dim childNode As UltraWinTree.UltraTreeNode = uTreeOptions.Nodes.Add() childNode.Override.ColumnSet = rootColumns childNode.Cells("Qty").Value = 0 childNode.Cells("Qty").AllowEdit = AllowCellEdit.Full Dim wne As New UltraWinEditors.UltraNumericEditor() wne.Name = row("ContractSequence").ToString.Trim() wne.SpinButtonDisplayStyle = ButtonDisplayStyle.Always wne.MaxValue = 9 wne.MinValue = 0 wne.Nullable = False wne.MaskInput = "#" wne.MaskDisplayMode = UltraWinMaskedEdit.MaskMode.Raw wne.Value = 0 childNode.Override.ColumnSet.Columns("Qty").EditorComponent = wnechildNode.Cells("Description").Value = row("WebNarrative1").ToString().Trim() & " - " & CDbl(row("Price")).ToString("C")Next
Thanks in advance,
Mike
Yes. Thank you.
Hello,
I am just checking did you solve your issue accordingly to the information that Michael provided you?
Let me know if you need any further assistance.
Hi, Mike. Sorry for the confusion.
I was getting an error when I was programmatically setting up the WinTree.
That went away when I used the designer to set up the WinTree and removed the code.
Thanks again,
Hi Mike,
That's correct, you have to set CellClickAction to be able to edit a cell.
I thought you said you were getting some kind of error when you assigned the editor, though. That's the problem I was trying to help you resolve.
Anyway, your sample looks fine to me.
Sure thing. See attached.
BTW, I got it to work by setting the Override.CellClickAction property of the UltraTreeView control to CellClickAction.EditCell.
I don't understand why I needed to do this.
In any event can you take a quick look and tell me if what I did is a good/correct way of doing it?