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

Column chooser makes the select all check box to disappear

3 Answers 217 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Farhan
Top achievements
Rank 1
Farhan asked on 19 Nov 2010, 02:28 AM
I am currently working with a column chooser on a RadGridView. The column chooser is similar to the one found in Vladimir's blog. The problem is that as soon as I launch the column chooser, select all check box on the data grid is over written by an empty header. Can you please help me?

My first column is a telerik select all column:
<telerik:GridViewSelectColumn/>  

<telerik:RadGridView Margin="0,25,0,0"
                                     x:Name="TrancheList"
                                     ItemsSource="{Binding Path=TrancheDataCollection}"
                                     AutoGenerateColumns="False"                                      
                                     ScrollMode="Deferred"                                                                           
                                     SelectedItem="{Binding SelectedTranche, Mode=TwoWay}"                                       
                                     FrozenColumnCount="3"
                                     Background="#FF91AEC9"
                                     AlternationCount="2"
                                     EnableRowVirtualization="True"                                     
                                     SelectionMode="Extended"                                     
                                     >
                <telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu>
                        <telerik:RadMenuItem Header="Column Chooser" Click="RadMenuItem_Click"/>
                    </telerik:RadContextMenu>
                </telerik:RadContextMenu.ContextMenu>
                <inter:Interaction.Behaviors>
                        <beh:RadGridMultiSelectBehaviour SelectedItems="{Binding SelectedItems}"/>
                    </inter:Interaction.Behaviors> 



<Window x:Class="AnalyticsDealsModule.Views.ColumnChooser"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        
        Title="Tranche List Column Chooser" Height="300" Width="400"
        WindowStyle="SingleBorderWindow"         
        Topmost="True"
        >
    <Grid>
        <Grid x:Name="LayoutRoot" Margin="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <TextBlock Text="Available columns:" />
            <ListBox ItemsSource="{Binding Columns}" Grid.Row="1">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <CheckBox Content="{Binding Header}" IsChecked="{Binding IsVisible, Mode=TwoWay}" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
    </Grid>
</Window>

3 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 23 Nov 2010, 06:14 PM
Hello Farhan,

I am sending you a sample project illustrating a possible workaround for the issue. Please take a look at it and let me know if it works for you.
 

All the best,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
DKO
Top achievements
Rank 1
answered on 13 Mar 2018, 09:48 AM

I'm sorry to bump this old topic but I've stumbled upon this same issue.

I would like to have the possibility to hide the telerik:GridViewSelectColumn while keeping the <Select/Deselect all> checkbox working.

Isn't there any other solution for this?

0
Stefan
Telerik team
answered on 15 Mar 2018, 02:58 PM
Hello Dekeyzer,

The approach of achieving such customization is demonstrated in the Column Selection SDK Example. It can be easily reviewed through the SDK Samples Browser. Can you please take a look at it and let me know in case further assistance is needed?

Hope it helps.

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Farhan
Top achievements
Rank 1
Answers by
Maya
Telerik team
DKO
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or