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

Change cell font color on RadGrid Rebind()

1 Answer 427 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rémi
Top achievements
Rank 1
Rémi asked on 20 Jun 2016, 06:57 AM

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 ?

1 Answer, 1 is accepted

Sort by
0
Rémi
Top achievements
Rank 1
answered on 20 Jun 2016, 09:17 AM
Well nevermind, just a configuration problem with the RadAjaxManager...
Tags
Grid
Asked by
Rémi
Top achievements
Rank 1
Answers by
Rémi
Top achievements
Rank 1
Share this question
or