Hi,
I can able to format the cells of the RadGrid. I want to format footer and group footer based on some condition like in the following code.
Look at the following code which i format for the cell:
Thanks.
Regards
Syed Arshad
I can able to format the cells of the RadGrid. I want to format footer and group footer based on some condition like in the following code.
Look at the following code which i format for the cell:
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound |
'Is it a GridDataItem |
If (TypeOf (e.Item) Is GridDataItem) Then |
'Get the instance of the right type |
Dim dataBoundItem As GridDataItem = e.Item |
Dim a As New ArrayList |
a.Add("M9_Sep") |
a.Add("M10_Oct") |
a.Add("M11_Nov") |
a.Add("M12_Dec") |
a.Add("M1_Jan") |
a.Add("M2_Feb") |
a.Add("M3_Mar") |
a.Add("M4_Apr") |
a.Add("M5_May") |
For i As Integer = 0 To 8 |
Dim s As Integer = 0 |
Integer.TryParse(dataBoundItem(a(i)).Text, s) |
Select Case s |
Case Is > 120 |
dataBoundItem(a(i)).BackColor = Drawing.Color.Red |
Case 90 To 120 |
dataBoundItem(a(i)).BackColor = Drawing.Color.Green |
Case 60 To 89 |
dataBoundItem(a(i)).BackColor = Drawing.Color.Yellow |
Case Is < 60 |
dataBoundItem(a(i)).BackColor = Drawing.Color.Purple |
End Select |
Next |
End If |
Thanks.
Regards
Syed Arshad