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

How set visibility of Header Row to false

3 Answers 196 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 26 Sep 2018, 02:55 PM

How i can set to false the header row visibility? I dont' want use header row.

 

Thanks

3 Answers, 1 is accepted

Sort by
0
Accepted
Lance | Manager Technical Support
Telerik team
answered on 26 Sep 2018, 06:30 PM
Hello Massimiliano,

There is no explicit HeaderRow style to set this, rather you want to style column headers instead.  You can learn more about the HeaderStyle properties in the Columns Styling article (be sure to read the green notes). See my other forum post with an example that achieves this.

If you have any trouble implementing your custom style, please open a support ticket here and share your code with the DataGrid development team so that can assist further.

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
n/a
Top achievements
Rank 1
answered on 27 Sep 2018, 08:10 AM

It's work but i've but not in all my columns. In an oreder column i I see the arrow indicating the sorting (i try to set TextColor for this header column with white (the arrow is black) but it's not work. I also insert OptionsButtonTextColor="Transparent" for hide the dots at the end of each column

 

This is my grid :

<telerikDataGrid:RadDataGrid x:Name="gridTotal" 
                                     Margin="60,0,60,0"
                                     SelectionMode="Single" 
                                     SelectionUnit="Row" 
                                     UserFilterMode="Disabled" 
                                     UserGroupMode="Disabled" 
                                     UserSortMode="None" 
                                     AutoGenerateColumns="False" 
                                     ItemsSource="{Binding TransactionResponseModelForGrid}" 
                                     Grid.Row="10" 
                                     Grid.Column="0" 
                                     Grid.ColumnSpan="4" 
                                     Grid.RowSpan="12" 
                                     SelectionChanged="grid_SelctionChanged" >
            <telerikDataGrid:RadDataGrid.SortDescriptors>
                <common:PropertySortDescriptor PropertyName="IssuingDate" SortOrder="Descending" />
            </telerikDataGrid:RadDataGrid.SortDescriptors>
            <telerikDataGrid:RadDataGrid.SelectionStyle>
                <telerikDataGrid:DataGridBorderStyle BackgroundColor="LightGray" BorderColor="Black" BorderThickness="1" />
            </telerikDataGrid:RadDataGrid.SelectionStyle>
            <telerikDataGrid:RadDataGrid.Columns>
                <telerikDataGrid:DataGridTextColumn PropertyName="Id" HeaderText="TRANSACTION ID" Width="150" SizeMode="Fixed" >
                    <telerikDataGrid:DataGridTextColumn.CellDecorationStyle>
                        <telerikDataGrid:DataGridBorderStyle BorderThickness="1, 0.5, 0.5, 0.5" BorderColor="White" />
                    </telerikDataGrid:DataGridTextColumn.CellDecorationStyle>
                    <telerikDataGrid:DataGridTextColumn.HeaderStyle>
                        <telerikDataGrid:DataGridColumnHeaderStyle BorderColor="Transparent"
                                            BorderThickness="0"
                                            BackgroundColor="Transparent"
                                            OptionsButtonTextColor="Transparent"
                                            TextMargin="0"/>
                    </telerikDataGrid:DataGridTextColumn.HeaderStyle>
                    <telerikDataGrid:DataGridTextColumn.HeaderContentTemplate>
                        <DataTemplate>
                            <Grid Padding="0" Margin="0" />
                        </DataTemplate>
                    </telerikDataGrid:DataGridTextColumn.HeaderContentTemplate>
                    <telerikDataGrid:DataGridTextColumn.CellContentStyle>
                        <telerikDataGrid:DataGridTextCellStyle TextColor="White" HorizontalTextAlignment="Center"
                                                       FontSize="12" 
                                                         />
                    </telerikDataGrid:DataGridTextColumn.CellContentStyle>
                </telerikDataGrid:DataGridTextColumn>
                <telerikDataGrid:DataGridDateColumn PropertyName="IssuingDate" 
                                            HeaderText="ISSUING DATE" Width="110" SizeMode="Fixed" CellContentFormat="{}{0:dd/MM/yyyy}" >
                    <telerikDataGrid:DataGridTextColumn.CellDecorationStyle>
                        <telerikDataGrid:DataGridBorderStyle BorderThickness="1, 0.5, 0.5, 0.5" BorderColor="White" />
                    </telerikDataGrid:DataGridTextColumn.CellDecorationStyle>
                    <telerikDataGrid:DataGridTextColumn.HeaderStyle>
                        <telerikDataGrid:DataGridColumnHeaderStyle BorderColor="Transparent"
                                            OptionsButtonTextColor="Transparent"
                                            BorderThickness="0"
                                            BackgroundColor="Transparent" TextColor="White"                                          
                                            TextMargin="0"/>
                    </telerikDataGrid:DataGridTextColumn.HeaderStyle>
                    <telerikDataGrid:DataGridTextColumn.HeaderContentTemplate>
                        <DataTemplate>
                            <Grid Padding="0" Margin="0" />
                        </DataTemplate>
                    </telerikDataGrid:DataGridTextColumn.HeaderContentTemplate> 
                  
                    <telerikDataGrid:DataGridDateColumn.CellContentStyle>
                        <telerikDataGrid:DataGridTextCellStyle TextColor="White"  FontSize="12" HorizontalTextAlignment="Center"  >
                        </telerikDataGrid:DataGridTextCellStyle>
                    </telerikDataGrid:DataGridDateColumn.CellContentStyle>
                </telerikDataGrid:DataGridDateColumn>

            </telerikDataGrid:RadDataGrid.Columns>
        </telerikDataGrid:RadDataGrid>

0
n/a
Top achievements
Rank 1
answered on 27 Sep 2018, 08:16 AM
I solved using the property IndicatorColor="Transparent".
Tags
DataGrid
Asked by
n/a
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
n/a
Top achievements
Rank 1
Share this question
or