3 posts, 1 answers
  1. Yaroslav
    Yaroslav avatar
    6 posts
    Member since:
    Feb 2019

    Posted 30 Jul 2019 Link to this post

    Hi guys,

    In our application we are using RadTreeListView and need to give users an ability to choose displayed columns (except the tree column).

    Given all the similiarities between RadTreeListView and RadGridView I expected to use property CanUserSelectColumns (like described here but surprisingly such a property does not exist for RadTreeListView. 

    So could you please advise what would be the best possible solution given that we want it to be the same way as for gridviews in other parts of the application? Thank you.

  2. Answer
    Vladimir Stoyanov
    Vladimir Stoyanov avatar
    541 posts

    Posted 01 Aug 2019 Link to this post

    Hello Yaroslav,

    Thank you for the provided link.

    Currently, the RadTreeListView does not support column selection and that is why it does not have the CanUserSelectColumns property. I am assuming that there were some difficulties with the hierarchy structure and that is why the feature was only implemented for the RadGridView.

    That said, if you only want to enable the column selection for non-hierarchy columns, I can suggest utilizing some methods residing in GridViewDataControl. I am attaching a sample project demonstrating what I have in mind.

    Note, that the approach uses an internal property of GridViewDataControl, which it accesses using reflection. The methods of that class are exposed by the RadGridView, however the RadTreeListView does not expose them, since it does not support column selection. Additionally, note that the demonstrated approach is a customization and I have not tested it extensively on my end.

    I hope you find this helpful.

    Vladimir Stoyanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Yaroslav
    Yaroslav avatar
    6 posts
    Member since:
    Feb 2019

    Posted 05 Aug 2019 Link to this post

    Hi Vladimir,

    Yes that's very helpful, thank you for your answer and the example.


Back to Top