How can we set style for caption in radgrid?
Following is how I am trying to set the caption text:
radExport.MasterTableView.Caption = "Reports";
I believe you can adjust the styling like this:
<style type="text/css">
.MasterTable_Default caption {
color: red;
}
.DetailTable_Default caption {
color: blue;
}
</style>
Here's some documentation that talks about it:
http://www.telerik.com/help/aspnet/grid/radgrid-telerik.webcontrols.gridtableview-caption.html
You can also write your own HTML code and bind through RadGrid.MasterTableView.Caption at the Export Button Click. It can be a logo or some statement that you would like to have it at the top of the file.
string firstHeaderLine = "<div id='master' style='color:black; text-align:left;'>Company Name: XYZ</div>";
firstHeaderLine += "<div id='master' style='color:black; text-align:left;'>Date Report Generated: " + DateTime.Now.ToShortDateString() + "</div>";
firstHeaderLine += "<div id='master' style='color:black; text-align:left;'>Report Generated by: XYZ </div>";
RadGrid1.MasterTableView.Caption = firstHeaderLine;
Hope this will give you an idea.