This is a migrated thread and some comments may be shown as answers.

How could you replace the Column Headers with a Simple Caption?

2 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pooya
Top achievements
Rank 1
Pooya asked on 11 Jul 2011, 10:33 AM
I have a RadGrid with 2 columns, ID and Name. My MasterDetailTable shows Countries. and there is a nested table with exactly the same structure (ID and Name) and it shows the Cities.

The current behaviour is that I have all the columns appearing again for the nested table whereas I'd like to replace those columns with just a simple caption e.g. "Cities". The reason is that the ID and Name are already header texts of the MasterDetailTable.

I saw how to hide the header: http://demos.telerik.com/aspnet-ajax/grid/examples/client/scrolling/defaultcs.aspx

but how could I replace it with a simple caption?

TreeList: http://demos.telerik.com/aspnet-ajax/treelist/examples/firstlook/defaultcs.aspx also looks interesting and I may be able to use it but again I'd need a way to add Caption to the detail tables.

any help?

Thanks

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jul 2011, 11:11 AM
Hello Pooya,

As far as I know, you can directly set caption using the property Caption in GridTableView.

aspx:
<telerik:GridTableView Caption="Cities" ShowHeader="false"  AutoGenerateColumns="false" HorizontalAlign="Left">
 </telerik:GridTableView>

Thanks,
Princy.
0
Pooya
Top achievements
Rank 1
answered on 11 Jul 2011, 11:44 AM
Great, so simple; thanks :)
Tags
Grid
Asked by
Pooya
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Pooya
Top achievements
Rank 1
Share this question
or