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

[Solved] Grid in GroupHeader

1 Answer 105 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.
Miguel Rios
Top achievements
Rank 1
Miguel Rios asked on 27 Nov 2009, 03:01 AM
Hi to the Telerik team,

I'm developing an application with the telerik grid and I would like that when elements are gropued in the grid the group header shows a little grid, of a row, that shows the data of the first element in the group. I have seen that it might be possible with grid.resources, but i haven't get how...


Also i would like to control the read only property of a cell according to the value in other cell in the same row, for example, if rowX >= 3, rowY = readOnly.

Any acclaration i would be pleased to answer...


Any ideas, help, suggestion or guidance about this?


Greeting to the team.

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 02 Dec 2009, 06:14 PM
Hi Miguel Rios,

I have attached an example which demonstrates a solution for your request.

1.Customizing the Group header:

 - Create custom GroupRowStyle for grid view
    It is used to reorder the content presenter in order to enable opening and closing the group header even if the inner grid is clicked

 - Create custom data template for GroupHeaderTemplate
   It can be used to insert a grid view in the group header

 - Attach to Grouping event of the grid to pass the desired data to the nested grid
    In your particular case you can pass the first element in the group


2. Disable editing cell content depending on other cells values in the row

 - Subscribe to BeginEdit event
One can evaluate the conditions and set e.Cancel to true to prevent entering in edit mode.

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

Greetings,
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.
Tags
GridView
Asked by
Miguel Rios
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or