How to work with GridView Content

2 posts, 0 answers
  1. Haythem
    Haythem avatar
    26 posts
    Member since:
    Jun 2013

    Posted 16 Jan 2014 Link to this post

    Hello,
    I have to work with a GridViewColumn named "Alert" containing a <DataTemplate> wich is composed by a checkBox and a textBlock...
    Please, i need your help to do the following:
    If i the checkBox is checked i want to ge the content of the "ForeCast" column (column n° 9) and put it in the textBlock and change its foreground to green.
    I tried to do this but i did not knew from where to get the content of the grid. P.s: my grid itemsSource is generated from an ObservableCollection<BusinessItem>.
    Here is a print screen of my grid
    Waiting forward for your answer...

    Cordially,
    KAROUI Haythem
  2. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 20 Jan 2014 Link to this post

    Hello,

    Generally, the recommended approach is to work with the data items. In this case you could use the CellStyleSelector. Please check this help article, where you can find detailed information about how to use it. You could also check our online demo


    Regards,
    Yoan
    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