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

How to hide option menu on header row?

8 Answers 354 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Pavariss
Top achievements
Rank 1
Pavariss asked on 21 Mar 2018, 04:46 AM

Hi,

How to disable/hide context menu options on header row (vertical three dot) ?

8 Answers, 1 is accepted

Sort by
0
Pavariss
Top achievements
Rank 1
answered on 21 Mar 2018, 04:53 AM
see in image attached
0
Lance | Manager Technical Support
Telerik team
answered on 21 Mar 2018, 10:16 PM
Hi Pavariss,

The vertical ellipsis is for the grouping and filtering menu, you can remove it by disabling the relevant option:

<dataGrid:RadDataGrid UserGroupMode="Disabled"
               UserFilterMode="Disabled"
               UserSortMode="None"

Review the UI for Xamarin DataGrid documentation for more information.

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Safak
Top achievements
Rank 1
answered on 27 Mar 2018, 12:04 AM

Hi Lance,

This is not worked for me:

 

 <telerikDataGrid:RadDataGrid x:Name="statementsGrid"
                                    AutoGenerateColumns="False"
                                    ItemsSource="{Binding Statements}"
                                    UserEditMode="None"
                                    UserGroupMode="Disabled"
                                    UserFilterMode="Disabled"
                                    UserSortMode="None">
                                    <telerikDataGrid:RadDataGrid.GroupHeaderTemplate>
                                        <DataTemplate>
                                            <Label Text="{Binding Group.Key}" TextColor="Red" HorizontalOptions="CenterAndExpand" HorizontalTextAlignment="Center"/>
                                        </DataTemplate>
                                    </telerikDataGrid:RadDataGrid.GroupHeaderTemplate>
                                    <telerikDataGrid:RadDataGrid.Columns>
                                        <telerikDataGrid:DataGridTextColumn PropertyName="Month" HeaderText="{i18n:Translate Months}" CanUserEdit="False" CanUserSort="False" CanUserFilter="False" CanUserGroup="False">
                                            <telerikDataGrid:DataGridTextColumn.CellContentStyle>
                                                <telerikDataGrid:DataGridTextCellStyle HorizontalTextAlignment="Center" FontFamily="{StaticResource NormalFont}"/>
                                            </telerikDataGrid:DataGridTextColumn.CellContentStyle>
                                        </telerikDataGrid:DataGridTextColumn>
                                        <telerikDataGrid:DataGridNumericalColumn PropertyName="DebitValue" HeaderText="{i18n:Translate Debit}" CanUserEdit="False" CanUserSort="False" CanUserFilter="False" CanUserGroup="False">
                                            <telerikDataGrid:DataGridNumericalColumn.CellContentStyle>
                                                <telerikDataGrid:DataGridTextCellStyle HorizontalTextAlignment="Center"/>
                                            </telerikDataGrid:DataGridNumericalColumn.CellContentStyle>
                                        </telerikDataGrid:DataGridNumericalColumn>
                                        <telerikDataGrid:DataGridNumericalColumn PropertyName="CreditValue" HeaderText="{i18n:Translate Credit}" CanUserEdit="False" CanUserSort="False" CanUserFilter="False" CanUserGroup="False">
                                            <telerikDataGrid:DataGridNumericalColumn.CellContentStyle>
                                                <telerikDataGrid:DataGridTextCellStyle HorizontalTextAlignment="Center"/>
                                            </telerikDataGrid:DataGridNumericalColumn.CellContentStyle>
                                        </telerikDataGrid:DataGridNumericalColumn>
                                        <telerikDataGrid:DataGridNumericalColumn PropertyName="BalanceValue" HeaderText="{i18n:Translate Balance}" CanUserEdit="False" CanUserSort="False" CanUserFilter="False" CanUserGroup="False">
                                            <telerikDataGrid:DataGridNumericalColumn.CellContentStyle>
                                                <telerikDataGrid:DataGridTextCellStyle HorizontalTextAlignment="Center"/>
                                            </telerikDataGrid:DataGridNumericalColumn.CellContentStyle>
                                        </telerikDataGrid:DataGridNumericalColumn>
                                    </telerikDataGrid:RadDataGrid.Columns>
                                </telerikDataGrid:RadDataGrid>

0
Stefan Nenchev
Telerik team
answered on 28 Mar 2018, 10:56 AM
Hi, Safak,

You can control the visibility of this element by applying a custom DataGridColumnHeaderStyle to the HeaderStyle of the respective column. For example:

<telerikDataGrid:DataGridTextColumn PropertyName="Country">
    <telerikDataGrid:DataGridTextColumn.HeaderStyle>
        <telerikDataGrid:DataGridColumnHeaderStyle OptionsButtonTextColor="Transparent"
                                                   BorderColor="#D9D9D9"
                                                   BorderThickness="1"/>
    </telerikDataGrid:DataGridTextColumn.HeaderStyle>
</telerikDataGrid:DataGridTextColumn>

We will consider adding this as an example in the SDK Samples Browser and create a "how-to" article within our documentation.

Have a great rest of the week.

Regards,
Stefan Nenchev
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Safak
Top achievements
Rank 1
answered on 29 Mar 2018, 02:37 PM

Hi Stefan,

 

Now works fine.

 

Thank you.

 

0
ITC
Top achievements
Rank 1
answered on 06 Jul 2018, 01:35 PM
That's not very intuitive, but it works, thanks.
0
Kian
Top achievements
Rank 1
answered on 15 Nov 2019, 05:12 AM

Hi Stefan,

This works for me. Except that I could actually tap on it even though it is not visible. To fix it I set the OptionsButtonFontSize to zero.

Cheers,

Kian

0
Yana
Telerik team
answered on 15 Nov 2019, 06:51 AM

Hello Kian,

That's correct - you'd need to set the font size as well.

The complete solution is also shown in the following kb article:

Hide the three dots from DataGrid ColumnHeader

Regards,
Yana
Progress Telerik

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
DataGrid
Asked by
Pavariss
Top achievements
Rank 1
Answers by
Pavariss
Top achievements
Rank 1
Lance | Manager Technical Support
Telerik team
Safak
Top achievements
Rank 1
Stefan Nenchev
Telerik team
ITC
Top achievements
Rank 1
Kian
Top achievements
Rank 1
Yana
Telerik team
Share this question
or