4 Answers, 1 is accepted
0
Hello Praveen,
Please go through the following help topic:
Conditional Formatting for rows/cells on ItemDataBound
Let us know if you need further assistance.
Kind regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Please go through the following help topic:
Conditional Formatting for rows/cells on ItemDataBound
Let us know if you need further assistance.
Kind regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
PM
Top achievements
Rank 1
answered on 30 Nov 2009, 11:38 AM
Sorry, i tried it but not working.
My Status column is "GridTemplateColumn".
0
Princy
Top achievements
Rank 2
answered on 30 Nov 2009, 12:14 PM
Hello Praveen,
You would have to access the control in the ItemTemplate of the TemplateColumn and then format it according to your requirement:
aspx:
c#:
Thanks
Princy.
You would have to access the control in the ItemTemplate of the TemplateColumn and then format it according to your requirement:
aspx:
| <telerik:GridTemplateColumn> |
| <ItemTemplate> |
| <asp:Label ID="Label1" runat="server" Text='<%# Bind("Status") %>'></asp:Label> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
c#:
| protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| GridDataItem dataItem = (GridDataItem)e.Item; |
| Label lbl = (Label)dataItem.FindControl("Label1"); |
| if (lbl.Text == "Open") |
| lbl.ForeColor = System.Drawing.Color.Red; |
| } |
| } |
Thanks
Princy.
0
PM
Top achievements
Rank 1
answered on 30 Nov 2009, 12:23 PM
Thank You.