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

Hide column if empty

1 Answer 259 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ignacio Ortuzar
Top achievements
Rank 1
Ignacio Ortuzar asked on 24 Sep 2010, 10:44 PM
Hi,

I want to know if there's any way to hide a column if is empty without iterate on each value.

I'm usign SQL Server 2008 and it's not important the kind of the datasource object.

Thanks

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 28 Sep 2010, 01:29 PM
Hello Ignacio,

This is not possible, as the columns are created with no consideration of the corresponding values. You will have to iterate either in RadGrid.ItemDataBound or in RadGrid.PreRender. If needed, the column should be hidden by referencing it via the RadGrid.MasterTableView.RenderColumns collection or by using the MasterTableView.GetColumn() method.

All the best,
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
Ignacio Ortuzar
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or