Treeview item

Posted by: milosic.bogdan on 10 January 2019, 1:11 am EST

    • Post Options:
    • Link

    Posted 10 January 2019, 1:11 am EST

    Im strugling with treeview and have problem how to get item that im expanding…

    I tried with current item but it doesnt work.

  • Posted 10 January 2019, 4:26 pm EST

    Hi,

    For this, you should use the ItemExpanding event of C1TreeView. Using the following code I am accessing the header text of an item that is expanded and consists a checkbox

    private void _tree_ItemExpanding(object sender, SourcedEventArgs e)
    {
            var treeviewItem = e.Source as C1TreeViewItem;
            var headerText = ((treeviewItem.Header as CheckBox).Content as TextBlock).Text;
    }
    
    ```Also, attached is sample application to demonstrate the same.
    Thanks,
    Ruchir
    [zip filename="GetTreeViewItem.zip"]https://gccontent.blob.core.windows.net/forum-uploads/file-4fd44f70-1956-4777-99b1-ba1223c85021.zip[/zip]
  • Posted 10 January 2019, 6:15 pm EST

    Thank you

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels