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

Adding a div tag in a kendo grid row expantion

3 Answers 480 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mohit
Top achievements
Rank 1
Mohit asked on 25 Apr 2013, 01:30 PM
Hi,

I want to create a table and add it to a row in a kendo grid. I want to generate this table whenever I expand this row.

Regards,
Mohit

 

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 25 Apr 2013, 04:10 PM
Hi Mohit,


You could find a demo about defining a Detail Template on the following page. It demonstrates a similar scenario. 

Please let me know if it was helpful for you.

 

All the best,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Mohit
Top achievements
Rank 1
answered on 26 Apr 2013, 02:55 PM
Hi Dimiter Madjarov ,

I tried the same . But my requirement is little different. I am doing a web service call to get all employee details. Then on selection of a particular employee means if I click a row, I want to do another web service call to get some more data which I want to display inside each row. Means on every row click I want to do another web service call and then show it in that grid using a template. In the example it is getting 
<li><label>Country:</label>#= Country #</li>
<li><label>City:</label>#= City #</li>
<li><label>Address:</label>#= Address #</li>
<li><label>Home Phone:</label>#= HomePhone #</li> 

data for the fields in the first call when it get employee information. In my case it is throwing an exception, since i do not have these data before I click any grid.

It works fine if i do not use a template and show all data column wise. 

Regards,
Mohit
0
Daniel
Telerik team
answered on 30 Apr 2013, 10:21 AM
Hello Mohit,

In that case you could use the detailInit event to make the request and set the HTML in the request success callback. I created a jsBin example based on the demo that loads the employee territories in the detailInit event and displays them. 

Regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Mohit
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Mohit
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or