Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Devexpress.XtraTreeList click node

I have a Devexpress.XtraTreeList component. I want to catch in click event where the user is clicked on expand button or the node? How can I understand this?

Edit: Actually I am trying to do something like outlook using treelist. When I click the node, for example inbox, the messages in inbox are shown right side on the screen. When the user click another node, the treelist must be updated because some messages may be read. I did this functions in click event. It ıs OK. But in this case expand buttons functionality does not working normally.

Here is my problem

like image 857
user983924 Avatar asked Jan 12 '23 10:01

user983924


1 Answers

I found the solution..

Thanks everyone..

private void treeList1_Click(object sender, System.EventArgs e) {
    DevExpress.XtraTreeList.TreeList tree = sender as DevExpress.XtraTreeList.TreeList;
    DevExpress.XtraTreeList.TreeListHitInfo info = tree.CalcHitInfo(tree.PointToClient(MousePosition));
    if(info.HitInfoType == DevExpress.XtraTreeList.HitInfoType.Cell)
        ... // your code is here
}
like image 157
user983924 Avatar answered Jan 21 '23 11:01

user983924