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

Group header click

1 Answer 211 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ronald
Top achievements
Rank 1
Ronald asked on 28 Jun 2013, 10:43 AM
Hi,

I have a grid and its by default grouped through the datasource like below:

.DataSource(dataSource => dataSource
    .Ajax().Group(g => g.Add(c => c.ProjectName))
    .Read(read => read.Action("GetProjectItems", "Project"))
)
I would like to be able click the ProjectName which will then the project record in a popup.

How can I add a click event to the group header?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 01 Jul 2013, 11:01 AM
Hello Ronald,

In order to achieve this you could attach a click handler to the <th> element for ProjectName column. For example:

<script>
    $("#Grid .k-header").eq(1).click(function () { //your custom logic })
</script>
  Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Ronald
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or