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

Change Cell-Background on the basis of object-attribute

4 Answers 76 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.
Lukas
Top achievements
Rank 1
Lukas asked on 17 Sep 2012, 09:30 AM
Hello together,

i´ve a problem and don´t know how to solve it. I´ve googled and searched in the forum but didn´t find any solution.

Simply, I would like to implement the following.

I have a GridView, where per line a object with attributes like Name, Date, State, Action... is displayed. Each attribute has again attributes like the value and simplified a field with the background (e.g. red, blue, green), wich is dependent of the selected Action.

So, how can i change the individual Cell-Background of the selected row after the selection of the action? With the StyleSelector it isn´t possible. So, have anyone an idea? Would be really great :)

Best regards
Lukas

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 17 Sep 2012, 10:16 AM
Hello,

 You can check our demos and documentation for conditional styles for more info:
http://demos.telerik.com/silverlight/#GridView/Selectors/StyleSelectors/DeclarativeDefinition 
http://demos.telerik.com/silverlight/#GridView/Selectors/StyleSelectors/RowStyleSelector 

Kind regards,
Vlad
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Lukas
Top achievements
Rank 1
answered on 17 Sep 2012, 12:56 PM
Hello Vlad,

thank you for your fast answer. The following Link http://demos.telerik.com/silverlight/#GridView/Selectors/StyleSelectors/DeclarativeDefinition
would maybe help, but i must compare with a string, such as "blue", "red",...

It is possible?

Thank you

Best regards,
Lukas
0
Lukas
Top achievements
Rank 1
answered on 18 Sep 2012, 07:43 AM
Hi,

or another question. Is it possible with the event "BeginningEdit" of the DataGrid have access to other cells?

Thanks

Best regards,
Lukas
0
Vlad
Telerik team
answered on 19 Sep 2012, 06:32 AM
Hi,

 Indeed this is possible as to the accessing cells in BeginningEdit I believe that you should work with your data not with the UI in both Silverlight and WPF.

All the best,
Vlad
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Tags
GridView
Asked by
Lukas
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Lukas
Top achievements
Rank 1
Share this question
or