4 Answers, 1 is accepted
0
Hello Rajesh,
I recommend you set ExportOnlyData="true" to remove the hyperlinks. You can then apply underline (text-decoration: underline) style to the header cells of the desired columns - see below:
As to the background color, please examine the following link:
Word/Excel export (HTML-based) (Using ItemCreated/ItemDataBound section)
Regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
I recommend you set ExportOnlyData="true" to remove the hyperlinks. You can then apply underline (text-decoration: underline) style to the header cells of the desired columns - see below:
As to the background color, please examine the following link:
Word/Excel export (HTML-based) (Using ItemCreated/ItemDataBound section)
Regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Princy
Top achievements
Rank 2
answered on 12 May 2010, 01:57 PM
Hi Rajesh,
Try the following code snippet in order to format the exported data.
C#:
Also go through the following documentation on customizing the exported file.
Word/Excel export (HTML-based)
Thanks,
Princy.
Try the following code snippet in order to format the exported data.
C#:
protected void Button1_Click(object sender, EventArgs e) |
{ |
GridHeaderItem headerItem = (GridHeaderItem)RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0]; |
headerItem.Style.Add("text-decoration", "underline"); |
foreach (GridDataItem item in RadGrid1.MasterTableView.Items) |
{ |
item.Style.Add("color", "red"); |
} |
RadGrid1.MasterTableView.ExportToWord(); |
} |
Also go through the following documentation on customizing the exported file.
Word/Excel export (HTML-based)
Thanks,
Princy.
0
raaj
Top achievements
Rank 1
answered on 12 May 2010, 02:50 PM
Thank a lot Team. Since am new to this controls. am posting lots of questions to you.
I'm wondering about your support at once.
Thanks once again
Rajesh n.
I'm wondering about your support at once.
Thanks once again
Rajesh n.
0
raaj
Top achievements
Rank 1
answered on 12 May 2010, 03:02 PM
Princy,
It's not removing the underlines from Header and first 2 columns. further not changing color too. but rest of the datas except first and second columns colors are changing.. Pls. give me some other help.
thanks
Rajesh N.
It's not removing the underlines from Header and first 2 columns. further not changing color too. but rest of the datas except first and second columns colors are changing.. Pls. give me some other help.
thanks
Rajesh N.