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

Mystery GridSplitter

2 Answers 137 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 20 Jun 2012, 07:08 PM
I am using the RadGridView to simulate a ListBox because I want Delete functionality that isn't built into the RadListBox.
I've removed the headers, the RowIndicator, and I only have one column, but there's still a GridSplitter on the left side of the control. (See attached screenshot.) How can I get rid of this?

Here's my control XAML. I'm using Version 2012.2.607.40.

Thanks!

                <telerik:RadGridView Grid.Row="1"
                                     Margin="0,5,0,0"
                                     AllowDrop="False"
                                     SelectionMode="Extended"
                                     ShowGroupPanel="False"
                                     ShowColumnHeaders="False"
                                     ShowColumnFooters="False"
                                     ShowInsertRow="False"
                                     CanUserInsertRows="False"
                                     CanUserDeleteRows="True"
                                     ColumnWidth="*"
                                     CanUserResizeColumns="False"
                                     EditTriggers="None"
                                     RowDetailsVisibilityMode="Collapsed"
                                     RowIndicatorVisibility="Collapsed"
                                     AutoGenerateColumns="False"
                                     ItemsSource="{Binding Words}"
                                     MouseDoubleClick="wordList_MouseDoubleClick"
                                     Deleted="wordList_Deleted"
                                     Deleting="wordList_Deleting">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Phrase}" Width="*">
                            <telerik:GridViewDataColumn.CellTemplate>
                                <DataTemplate>
                                    <Grid>
                                        <ContentControl Content="{Binding}"
                                                        ContentTemplate="{StaticResource WordDataTemplate}"/>
                                    </Grid>
                                </DataTemplate>
                            </telerik:GridViewDataColumn.CellTemplate>
                        </telerik:GridViewDataColumn>
                    </telerik:RadGridView.Columns>
                    <telerik:RadGridView.SortDescriptors>
                        <telerik:ColumnSortDescriptor Column="{Binding Columns[\Phrase\], ElementName=wordList}" 
                                                            SortDirection="Ascending" />
                    </telerik:RadGridView.SortDescriptors>
                </telerik:RadGridView>

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Jun 2012, 05:27 AM
Hello,

 You can set CanUserFreezColumns to False. You may need to check our documentation if you have further questions. I'm not sure if you are aware however we have a component called RadListBox - maybe it will be better to use it instead RadGridView in your case.

Regards,
Vlad
the Telerik team

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

0
Randy
Top achievements
Rank 1
answered on 25 Jun 2012, 04:37 PM
Thanks! That did the trick.

The reason I'm not using the list box is because it seems to be missing editing functionality. I need support for add/edit/remove for entries in the list, which the ListBox didn't seem to support as nicely as the GridView.

Thanks again for your help.
Tags
GridView
Asked by
Randy
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Randy
Top achievements
Rank 1
Share this question
or