Change Cell-Background on the basis of object-attribute

5 posts, 0 answers
  1. Lukas
    Lukas avatar
    3 posts
    Member since:
    Aug 2012

    Posted 17 Sep 2012 Link to this post

    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
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 17 Sep 2012 Link to this post

    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.

  3. Lukas
    Lukas avatar
    3 posts
    Member since:
    Aug 2012

    Posted 17 Sep 2012 Link to this post

    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
  4. Lukas
    Lukas avatar
    3 posts
    Member since:
    Aug 2012

    Posted 18 Sep 2012 Link to this post

    Hi,

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

    Thanks

    Best regards,
    Lukas
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 19 Sep 2012 Link to this post

    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.

Back to Top