Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1465
How to add UltraNumericEditor
posted

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 = wne
childNode.Cells("Description").Value = row("WebNarrative1").ToString().Trim() & " - " & CDbl(row("Price")).ToString("C")

Next

Thanks in advance,
Mike
Parents Reply Children