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
165
Ellipsis button
posted

Hi there

I'm new in this forum. Let present me a little bit. I'm working in Auckland, New Zealand for a company that just start to use Infragistics components.

I am quiet new with Infragistics components. I have to develop a component using the WinTree and UltraTreeNodeColumn. And for a column, in the cells I would like an ellipsis button just like the propertygrid (when we have a collection) and get the click event to open my own form. I know how to have a combo in the cell but not such a button.

Any help is welcome. Thanks in advance

Cheers,

Sebastien

  • 69832
    Verified Answer
    Offline posted

    The key here is to add an EditorButton to the editor's ButtonsRight collection.

    Example:

    using Infragistics.Win;
    using Infragistics.Win.UltraWinTree;

    private void ultraTree1_ColumnSetGenerated(object sender, ColumnSetGeneratedEventArgs e)
    {
        TreeColumnsCollection columns = e.ColumnSet.Columns;
        foreach( UltraTreeNodeColumn column in columns )
        {
            //  Create an EditorWithText and assign it as the column's editor
            EditorWithText textEditor = new EditorWithText();
            column.Editor = textEditor;

            //  Create an EditorButton and add it to the editor's ButtonsRight
            //  collection, and handle its Click event.
            EditorButton editorButton = new EditorButton("ellipsis");
            editorButton.Text = "...";
            editorButton.Click += new EditorButtonEventHandler(this.OnEditorButtonClick);
            textEditor.ButtonsRight.Add( editorButton );
           
            //  Enable editing for the column
            column.AllowCellEdit = AllowCellEdit.Full;
        }
    }