This is a migrated thread and some comments may be shown as answers.

[Solved] dataTemplateSelector and rows with a different permissions

1 Answer 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
tomas
Top achievements
Rank 1
tomas asked on 26 Sep 2013, 03:37 PM
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

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 01 Oct 2013, 09:55 AM
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 >>
Tags
GridView
Asked by
tomas
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or