Change cell font color on RadGrid Rebind()

2 posts, 0 answers
  1. Rémi
    Rémi avatar
    24 posts
    Member since:
    May 2015

    Posted 20 Jun Link to this post

    Hi,

    The text color of my cells is not updated when I call the Rebind() of my RadGrid.

    I've implemented my logic as the following :

    - I fill my grid datasource in the NeedDataSource event

    - I set the style logic in the ItemDataBound event

    Protected Sub RgPermisMontage_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RgPermisMontage.ItemDataBound
            If TypeOf e.Item Is GridHeaderItem Then
                '''
            ElseIf TypeOf e.Item Is GridGroupHeaderItem Then
                '''
            ElseIf TypeOf e.Item Is GridDataItem Then
                Dim item As GridDataItem = e.Item
                If item("ysnDepotPrev").Text Then
                    item("dtDepot").ForeColor = Color.FromArgb(218, 95, 37)
                    item("dtDepot").Font.Italic = True
                Else
                    item("dtDepot").ForeColor = Color.Black
                    item("dtDepot").Font.Italic = False
                End If
                '''
            End If
        End Sub

    Then I update my grid source so I call the Rebind() to force the RadGrid to raise NeedDataSource event and ItemDataBound.

    My cell value is well updated but the cell style not.

     

    Do you have any ideas ?

  2. Rémi
    Rémi avatar
    24 posts
    Member since:
    May 2015

    Posted 20 Jun in reply to Rémi Link to this post

    Well nevermind, just a configuration problem with the RadAjaxManager...
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top