I am trying to show/hide columns in the GridView by Binding checkboxes to it, just like this example:
http://www.telerik.com/help/silverlight/radgridview-how-to-show-hide-columns-outside-of-the-radgridview.html
However, it is failing in my project. Is there some setting I'm adding/missing that is breaking this? The following actually throws an error and the designer won't render...
If I change this:
TO this:
Then it will render the checkboxes, but there is no text beside them?
http://www.telerik.com/help/silverlight/radgridview-how-to-show-hide-columns-outside-of-the-radgridview.html
However, it is failing in my project. Is there some setting I'm adding/missing that is breaking this? The following actually throws an error and the designer won't render...
<StackPanel x:Name="CustomizeGrid" Background="Transparent" Orientation="Horizontal"> <ListBox ItemsSource="{Binding Columns, ElementName=WorklistGridView}"> <ListBox.ItemTemplate> <DataTemplate> <CheckBox Content="{Binding Header}" IsChecked="{Binding IsVisible, Mode=TwoWay}" /> </DataTemplate> </ListBox.ItemTemplate> </ListBox> <telerik:RadGridView x:Name="WorklistGridView" AutoGenerateColumns="False" RowIndicatorVisibility="Collapsed" IsReadOnly="True" SelectionMode="Multiple" CanUserSelect="False" IsSynchronizedWithCurrentItem="False" ItemsSource="{Binding Mode=OneWay}" IsFilteringAllowed="True"> <telerik:RadGridView.Columns> <telerik:GridViewSelectColumn x:Name="Select" IsResizable="False" /> <telerik:GridViewDataColumn Header="Status" DataMemberBinding="{Binding OrderStatusDescription}"/> <telerik:GridViewDataColumn Header="Patient Name" DataMemberBinding="{Binding PatientName}"/>
If I change this:
<CheckBox Content="{Binding Header}"
TO this:
<CheckBox Content="{Binding WorklistGridView.Header}"
Then it will render the checkboxes, but there is no text beside them?