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

How to add css to GridBoundColumn in Rad Grid

1 Answer 339 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James@Nw
Top achievements
Rank 2
James@Nw asked on 28 Sep 2010, 11:04 AM
Hi Guys,

I want to be able to hide a column in my table using CSS display:none but the option below does not see to wan to work. I have also tried ClassName="cssProvince". Is there something specific I should be doing?

<telerik:GridBoundColumn class="cssProvince" DataField="Province" HeaderText="Province" ReadOnly="True" SortExpression="Province" UniqueName="Province">

Thanks
James

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 28 Sep 2010, 12:07 PM
Hello James,

The correct way to hide a column is by setting its Display="false" server property. You can then show it client-side by using the control's API or the header context menu.

http://demos.telerik.com/aspnet-ajax/grid/examples/client/clientsideapi/defaultcs.aspx

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/headercontextmenu/defaultcs.aspx

Greetings,
Dimo
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
Tags
Grid
Asked by
James@Nw
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or