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

Dynamic columns but hide some

1 Answer 90 Views
GridView
This is a migrated thread and some comments may be shown as answers.
swarmttied
Top achievements
Rank 1
swarmttied asked on 23 Jan 2012, 12:39 AM
Hi, I'm have an unusual requirement here. We want to bind the gridview to any strong-typed objects but at the same time, we're not going to hide some columns. So this basically precludes us from defining columns in XAML. So my option is to handle an event which is fired during the creation of columns. There I could probably suppress the creation of some columns. Is there such an event?

1 Answer, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 23 Jan 2012, 06:58 AM
Hello,

You can handle AutoGeneratingColumn event of RadGridView. You can take a look at this article for a reference. In your case however, instead of canceling its creation, you can set its IsVisible property to "False" when required. 

 

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
swarmttied
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or