How to get column of the selected cell

5 posts, 1 answers
  1. Marcus
    Marcus avatar
    35 posts
    Member since:
    Aug 2012

    Posted 28 Oct 2015 Link to this post

    Hello support,

    how can I get the selected cell within a TreeListView?

    With TreeListView.SelectedItem I get the whole row (mark yellow in attached image), but how can I get the column of the selected cell (see image)?

    I need this information to display a summary of the selected column.

     Thanks in advance

    Marcus

  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 28 Oct 2015 Link to this post

    Hello Marcus,

    The column of each cell can be found through its Column (or DataColumn if it is of type GridViewDataColumn) property. For example:
    var column = this.clubsGrid.CurrentCell.Column;

    If you want to get always the column to which the current cell belongs, you can work directly with CurrentColumn property of RadTreeListView. 


    Regards,
    Maya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Marcus
    Marcus avatar
    35 posts
    Member since:
    Aug 2012

    Posted 16 Nov 2015 Link to this post

    Hello Maya,

    your post helps me.

    But now the next problem: I use "TreeListView.SelectionChanged" for recognizing changes in selction. But this event is not fired when I click on cells in the same selcted row one after another. How can I solve this?

    Regards

    Marcus

  5. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 17 Nov 2015 Link to this post

    Hello Marcus,

    You can try working with CurrentCellChanged event in this case. Please give it a try and let me know whether it meets your requirements. 


    Regards,
    Maya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Marcus
    Marcus avatar
    35 posts
    Member since:
    Aug 2012

    Posted 17 Nov 2015 in reply to Maya Link to this post

    Hello Maya,

     this works as expected.

    Thanks a lot.

    Marcus

Back to Top
UI for WPF is Visual Studio 2017 Ready