dataTemplateSelector and rows with a different permissions

2 posts, 0 answers
  1. tomas
    tomas avatar
    139 posts
    Member since:
    Sep 2012

    Posted 26 Sep 2013 Link to this post

    hello Telerik,

    Please help me with this:

    I have a collection of objects like this:
    public class MyBusinessClass
    {
     public string ErrorMsg { get; set; }
     public int Value { get; set; }
     public bool ValueReadPermission { get; set; }
     public int Value2 { get; set; }
     public bool Value2ReadPermission { get; set; }

    }

    There are different combionations of ValueReadPermission and Value2ReadPermission ... (more columns).

    I need to show the Value property in a grid column but only in case the ReadPermission == True. If there is a lack of permission, I would like to show some icon in the column. I don't know how to implement binding to different dataTemplates. (If this is the correct approach).

    I also don't know, how to implement sorting, filtering, grouping in a such way the user would not be able to guess the Value using for example grouping by the column Value.

    Thank you very much.

    Tom
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 01 Oct 2013 Link to this post

    Hello Tom,

    For that purpose I can suggest you to apply a CellTemplateSelector for the column. You can refer to this help article for a demonstration on how to apply a CellTemplateSelector. 

    Let me know how it works for you.
     

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top