3 Answers, 1 is accepted
0
Hello jana,
Please review the following help article elaborating on the matter.
Sincerely yours,
Steve
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Please review the following help article elaborating on the matter.
Sincerely yours,
Steve
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
jana
Top achievements
Rank 1
answered on 21 Apr 2008, 11:06 AM
The artical which you have refered explains about the color change in the Rows, but what i need is Change of Font colors in Columns.Can you please help me regarding this.
Thanks,
Jana
Thanks,
Jana
0
Accepted
Hi jana,
Here is an example how to accomplish this using ItemStyle.CssClass (in this case of auto-generated columns using ColumnCreated):
protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
{
if (e.Column.IsBoundToFieldName("ProductID"))
{
e.Column.ItemStyle.CssClass = "MyClass1";
}
else if (e.Column.IsBoundToFieldName("ProductName"))
{
e.Column.ItemStyle.CssClass = "MyClass2";
}
else if (e.Column.IsBoundToFieldName("SupplierID"))
{
e.Column.ItemStyle.CssClass = "MyClass1";
}
}
...
<style type="text/css">
.MyClass1
{
color: Red;
}
.MyClass2
{
color: Blue;
}
</style>
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Here is an example how to accomplish this using ItemStyle.CssClass (in this case of auto-generated columns using ColumnCreated):
protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
{
if (e.Column.IsBoundToFieldName("ProductID"))
{
e.Column.ItemStyle.CssClass = "MyClass1";
}
else if (e.Column.IsBoundToFieldName("ProductName"))
{
e.Column.ItemStyle.CssClass = "MyClass2";
}
else if (e.Column.IsBoundToFieldName("SupplierID"))
{
e.Column.ItemStyle.CssClass = "MyClass1";
}
}
...
<style type="text/css">
.MyClass1
{
color: Red;
}
.MyClass2
{
color: Blue;
}
</style>
Best wishes,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
