I could make the undesired fields private and it disappears, but there are some times when I use the another ObservableCollection of the same object where I want all the columns
thanks
jcb
6 Answers, 1 is accepted
You may try to set the IsVisible property of the column to "False".
Maya
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
I am hiding the column from the view model at start. Based on some drop down changes, i want to show the column.
But I when I associate this property using two way binding property, its not getting updated to unhide the column.
Could you share a bit more details about your implementation? Generally, any relevant information and code-snippet would be helpful.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Here's my sample code
<telerik:GridViewDataColumn Width="150" DataMemberBinding="{Binding Status}" IsVisible= "{Binding Source={StaticResource MyViewModel}, Path=IsAdminUser}">
<telerik:GridViewDataColumn.Header>
<TextBlock Text="Status"/>
</telerik:GridViewDataColumn.Header>
</telerik:GridViewDataColumn>
View Model: MyViewModel
public bool IsAdminUser
{
get { return isAdminUser; }
set
{
isAdminUser = value;
RaisePropertyChanged(() => this.IsAdminUser);
}
}
I believe this forum thread might be helpful in your case. Please take a look at it and let me know in case you have any further difficulties.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>