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
3455
Adding combobox in WinTree
posted

How to add a combobox in WinTree.

please write some code in c# as i have to add it at runtime

  • 69832
    Verified Answer
    Offline posted

    This example assumes you are using one of the non-standard settings for ViewStyle (Grid, FreeForm, OutlookExpress).

    You get get a reference to an UltraTreeNodeColumn by handling the ColumnSetGenerated event, and accessing the Columns collection of the UltraTreeColumnSet that gets passed to the event.

    Example:
    private void AddDropDown( UltraTreeNodeColumn column )
    {
        //  Create and populate a ValueList.
        ValueList vl = new ValueList();
        vl.ValueListItems.Add( 1, "One" );
        vl.ValueListItems.Add( 2, "Two" );
        vl.ValueListItems.Add( 3, "Three" );
        vl.ValueListItems.Add( 4, "Four" );
        vl.ValueListItems.Add( 5, "Five" );

        //  Assign the ValueList to the ValueList property.
        column.ValueList = vl;

        //  Assign an EditorWithCombo to the Editor property.
        column.Editor = new EditorWithCombo();
    }