How To Customize the Telerik RadGridView GridViewDataColumn.Header

1 posts, 0 answers
  1. shankar parshimoni
    shankar parshimoni avatar
    18 posts
    Member since:
    Sep 2012

    Posted 05 Dec 2012 Link to this post

    Hi All,

    I New to Telerik i have problem regarding how to customize the GridViewDataColumn.Header in the Telerik RadGridView Header's Black Border Space.Where i'm having .I'm attaching the image for further uderstanding and also providing the code down below


    <telerik:RadGridView Name="GridViewSellIn"  
                                                         Visibility="Visible"
                                                         GridLinesVisibility="Both"
                                                         AutoGenerateColumns="False"
                                                         ShowColumnFooters="True"
                                                         IsReadOnly="True"
                                                         ShowGroupPanel="False"
                                                         CanUserSortColumns="False"
                                                         ShowGroupFooters="False"
                                                         ScrollMode="RealTime"
                                                         ShowInsertRow="False"
                                                         ShowColumnHeaders="True"  RowLoaded="GridViewSellIn_RowLoaded" DataLoaded="GridViewSellIn_DataLoaded"
                                                         RowIndicatorVisibility="Collapsed"
                                                         IsSynchronizedWithCurrentItem="False"
                                                         IsEnabled="True" CanUserSelect="False"
                                                         Width="690" Grid.Column="1"
                                                         Grid.Row="1"
                                                         HorizontalAlignment="Left"
                                                         Margin="10,5,0,0">
                                    <telerik:RadGridView.Columns>
                                        <telerik:GridViewDataColumn>
                                            <telerik:GridViewDataColumn.Header>
                                                <Grid Background="#0070C0">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="18"/>
                                                        <RowDefinition Height="18"/>
                                                        <RowDefinition Height="18"/>
                                                        <RowDefinition Height="18"/>
                                                    </Grid.RowDefinitions>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="170"/>
                                                    </Grid.ColumnDefinitions>
                                                    <Border BorderThickness="1" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="13" BorderBrush="Black">
                                                        <!--<TextBlock Grid.Row="0" Name="" Grid.Column="0" Grid.ColumnSpan="13" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" />-->
                                                    </Border>
                                                    <Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="13" BorderThickness="1" BorderBrush="Black">
                                                        <TextBlock Grid.Row="1" Name="" Grid.Column="0" Grid.ColumnSpan="13" Text=""  HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                    </Border>
                                                    <Border Grid.Row="2" Grid.Column="0" BorderThickness="1" BorderBrush="Black">
                                                        <TextBlock Grid.Row="2" Grid.Column="0" Text="" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                    </Border>
                                                    <Border Grid.Row="3" Grid.Column="0" BorderThickness="1" BorderBrush="Black">
                                                        <TextBlock Grid.Row="3" Grid.Column="0"  Text="" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                    </Border>
                                                </Grid>
                                            </telerik:GridViewDataColumn.Header>
                                            <telerik:GridViewDataColumn.CellTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="20"/>
                                                        </Grid.RowDefinitions>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="170"/>
                                                            <!--<ColumnDefinition Width="80"/>
                                                            <ColumnDefinition Width="80"/>
                                                            <ColumnDefinition Width="20"/>
                                                            <ColumnDefinition Width="80"/>-->
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock Grid.Row="0" Grid.Column="0"  Text="" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                    </Grid>
                                                </DataTemplate>
                                            </telerik:GridViewDataColumn.CellTemplate>
                                        </telerik:GridViewDataColumn>
                                        <telerik:GridViewDataColumn>
                                            <telerik:GridViewDataColumn.Header>
                                                <Grid Background="#0070C0">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="18"/>
                                                        <RowDefinition Height="18"/>
                                                        <RowDefinition Height="18"/>
                                                        <RowDefinition Height="18"/>
                                                    </Grid.RowDefinitions>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="85"/>
                                                        <ColumnDefinition Width="85"/>
                                                        <ColumnDefinition Width="18"/>
                                                        <ColumnDefinition Width="55"/>
                                                    </Grid.ColumnDefinitions>
                                                    <Border BorderThickness="1" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" BorderBrush="Black">
                                                        <TextBlock Grid.Row="0" Name="" Grid.Column="0" Grid.ColumnSpan="4" Text="" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                    </Border>
                                                    <Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black">
                                                        <TextBlock Grid.Row="2" Grid.Column="1" Name="" Grid.ColumnSpan="4" Text=""  HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                    </Border>
                                                    <Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="13" BorderThickness="1" BorderBrush="Black">

                                                    </Border>
                                                    <Border Grid.Row="4" Grid.Column="0" BorderThickness="1" BorderBrush="Black">
                                                        <TextBlock Grid.Row="3" Grid.Column="1"  Text=""  HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                    </Border>
                                                    <Border Grid.Row="4" Grid.Column="1" BorderThickness="1" BorderBrush="Black">
                                                        <TextBlock Grid.Row="3" Grid.Column="2"  Text="" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                    </Border>
                                                    <Border Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="Black">
                                                        <StackPanel Orientation="Horizontal">
                                                            <TextBlock Grid.Row="4" Grid.Column="2"  Text="" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                            <TextBlock Grid.Row="3" Grid.Column="4"  Text="" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                        </StackPanel>
                                                    </Border>
                                                </Grid>
                                            </telerik:GridViewDataColumn.Header>
                                            <telerik:GridViewDataColumn.CellTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="20"/>
                                                        </Grid.RowDefinitions>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="85"/>
                                                            <ColumnDefinition Width="85"/>
                                                            <ColumnDefinition Width="18"/>
                                                            <ColumnDefinition Width="55"/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock Grid.Row="0" Grid.Column="0"  Text="" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                        <TextBlock Grid.Row="0" Grid.Column="1"  Text=""  HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                        <Image Source="" Width="15" Height="15" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"></Image>
                                                        <TextBlock Grid.Row="0" Grid.Column="3"  Text="" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                    </Grid>
                                                </DataTemplate>
                                            </telerik:GridViewDataColumn.CellTemplate>
                                        </telerik:GridViewDataColumn>
                                        <telerik:GridViewDataColumn>
                                            <telerik:GridViewDataColumn.Header>
                                                <Grid Background="#0070C0">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="18"/>
                                                        <RowDefinition Height="18"/>
                                                        <RowDefinition Height="18"/>
                                                        <RowDefinition Height="18"/>
                                                    </Grid.RowDefinitions>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="85"/>
                                                        <ColumnDefinition Width="85"/>
                                                        <ColumnDefinition Width="18"/>
                                                        <ColumnDefinition Width="55"/>
                                                    </Grid.ColumnDefinitions>
                                                    <Border BorderThickness="1" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" BorderBrush="Black">

                                                    </Border>
                                                    <Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" BorderThickness="1" BorderBrush="Black">
                                                        <TextBlock Grid.Row="2" Grid.Column="5" Name="" Grid.ColumnSpan="4" Text="" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                    </Border>
                                                    <Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="13" BorderThickness="1" BorderBrush="Black">
                                                    </Border>
                                                    <Border Grid.Row="4" Grid.Column="0" BorderThickness="1" BorderBrush="Black">
                                                        <TextBlock Grid.Row="3" Grid.Column="1"  Text=""  HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                    </Border>
                                                    <Border Grid.Row="4" Grid.Column="1" BorderThickness="1" BorderBrush="Black">
                                                        <TextBlock Grid.Row="3" Grid.Column="2"  Text="" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                    </Border>
                                                    <Border Grid.Row="4" Grid.Column="2" Grid.ColumnSpan="2" BorderThickness="1" BorderBrush="Black">
                                                        <StackPanel Orientation="Horizontal">
                                                            <TextBlock Grid.Row="4" Grid.Column="2"  Text="" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                            <TextBlock Grid.Row="3" Grid.Column="4"  Text="" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                                                        </StackPanel>
                                                    </Border>
                                                </Grid>
                                            </telerik:GridViewDataColumn.Header>
                                            <telerik:GridViewDataColumn.CellTemplate>
                                                <DataTemplate>
                                                    <Grid >
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="20"/>
                                                        </Grid.RowDefinitions>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="85"/>
                                                            <ColumnDefinition Width="85"/>
                                                            <ColumnDefinition Width="18"/>
                                                            <ColumnDefinition Width="55"/>
                                                        </Grid.ColumnDefinitions>
                                                        <TextBlock Grid.Row="0" Grid.Column="0"  Text="" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                        <TextBlock Grid.Row="0" Grid.Column="1"  Text="" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                        <Image Source="" Width="15" Height="15" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"></Image>
                                                        <TextBlock Grid.Row="0" Grid.Column="3"  Text="" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                                    </Grid>
                                                </DataTemplate>
                                            </telerik:GridViewDataColumn.CellTemplate>
                                        </telerik:GridViewDataColumn>
                                    </telerik:RadGridView.Columns>
                                </telerik:RadGridView>

    Please can anybody provide me any solution for the above problem

    Thanks

    parsanamoni

Back to Top