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

[Solved] Custom group Header

5 Answers 213 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
srinivas
Top achievements
Rank 1
srinivas asked on 23 Dec 2009, 08:52 AM
Hi,

I need to data group by department. In the Group descriptor row I need to display two values. I tried in the following but unable to see the columns at run time . Here I am attaching the file in which format has to be displayed in group header.





<data:GroupDescriptor Member="Department">  
                            <data:GroupDescriptor.DisplayContent > 
                                <DataTemplate> 
                                    <Grid> 
                                        <Grid.ColumnDefinitions> 
                                            <ColumnDefinition Width="*"></ColumnDefinition> 
                                            <ColumnDefinition Width="30"></ColumnDefinition> 
                                        </Grid.ColumnDefinitions> 
                                        <TextBlock Text="{Binding Department}" Grid.Column="0"></TextBlock> 
                                        <Image Grid.Column="1"   
                                                Width="13" Source="../../Images/button_more_details.png" 
                                                Height ="15" Margin="0,0,5,0" HorizontalAlignment="Left"></Image> 
                                    </Grid> 
                                </DataTemplate> 
                            </data:GroupDescriptor.DisplayContent> 
                        </data:GroupDescriptor> 

5 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 28 Dec 2009, 10:02 AM
Hello srinivas,

To achieve the desired header appearance you need to customize the GroupRowStyle of your grid. Please check the attached project illustrating how you can create group header similar to the screenshot you sent.

If you have any more questions do not hesitate to contact us.

Regards,
Tsvyatko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
srinivas
Top achievements
Rank 1
answered on 28 Dec 2009, 10:50 AM
Hi Tsvyatko,

In the attached zip file I am able to find only solution files (.sln and .suo) files only.

Could you please update the zip with the complete project.

Regards & Thank you
Srinivas
0
Tsvyatko
Telerik team
answered on 28 Dec 2009, 12:11 PM
Hi srinivas,

Please excuse me for the inconvenience. Attached you will find the sample project. To see the customized header, please try to group by department.

Best wishes,
Tsvyatko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
srinivas
Top achievements
Rank 1
answered on 29 Dec 2009, 12:26 PM
Hi Tsvyatko,

Thank you for the code.

I tried to modify the code as per requirement. But it is giving error.

I want to send you the modified code. Can you tell me how can I send the modified code zip to you.

Regards
Srinivas
0
Vlad
Telerik team
answered on 29 Dec 2009, 12:37 PM
Hello srinivas,

You can open support ticket.

Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
srinivas
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
srinivas
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or