Change Grid row colour based on one coloum value

2 posts, 0 answers
  1. Meenu
    Meenu avatar
    8 posts
    Member since:
    Mar 2013

    Posted 06 Mar 2014 Link to this post

    How to change The grid row colour based on some condition in silverlight applctaion

    In the grid, any value status="IOP" then the colour need to change to red...How can do that?


       Source.Add(New Data() With _

                    { _

                        .DateOf = e.Result(Loopcnt).ETdatedisplay,

                        .Locate = location,

                        .StatusOf = Status,

                        .SpeedOf = e.Result(Loopcnt).ETspeed

                    })





      TrackGrid.ItemsSource = Source

     TrackGrid.IsEnabled = True





    I tried the way I mentioned here below ...Nt Success..>requesting the help

                For i = 0 To 9

                    If TrackGrid.RowStyle.GetValue(i) = "IOP" Then

                        TrackGrid.Foreground = New SolidColorBrush(Colors.Red)

                    End If

                Next
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 07 Mar 2014 Link to this post

    Hello,

    You can achieve your goal applying RowStyleSelector for RadGridView.

    Regards,
    Didie
    Telerik

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  3. DevCraft banner
Back to Top