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

[Solved] telerik mvc Grid client event on expand

1 Answer 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
HaBo
Top achievements
Rank 1
HaBo asked on 04 Jan 2012, 05:44 PM
Hi, How can i call client jquery Function when grid expand is fired.

all that i want to achieve is.
when we expand the Telerik MVC grid 
we get this mark up in detail row

<tr class="t-detail-row">
<td class="t-hierarchy-cell"></td>
<td class="t-detail-cell" colspan="5"></td>
</tr>

i want to eliminate  <td class="t-hierarchy-cell"></td> in it.

and get the mark up as
<tr class="t-detail-row">
<td class="t-detail-cell" colspan="Current+1"></td>
</tr>

for this i though of doing some thing like this

on  grid expand function, if i can call a jquery function
then

function onExpandingtheGrid(){
$('tr.t-detail-row').find('td.t-hierarchy-cell').remove();
$('tr.t-detail-row').find('td.t-detail-cell').attr('colspan',newcolspan+1);
}

1 Answer, 1 is accepted

Sort by
0
HaBo
Top achievements
Rank 1
answered on 04 Jan 2012, 05:54 PM
i got the solution

all that needed was to add this line
.ClientEvents(exp => exp.OnDetailViewExpand("onExpandingtheGrid"))
that's it
Tags
Grid
Asked by
HaBo
Top achievements
Rank 1
Answers by
HaBo
Top achievements
Rank 1
Share this question
or