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

How To Customize the Telerik RadGridView GridViewDataColumn.Header

0 Answers 112 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
shankar parshimoni
Top achievements
Rank 1
shankar parshimoni asked on 05 Dec 2012, 07:12 AM
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

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
shankar parshimoni
Top achievements
Rank 1
Share this question
or