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

detail template as pop up using angular

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
shalaby
Top achievements
Rank 1
shalaby asked on 09 Sep 2015, 08:50 PM

my grid data come from angular http service, but I want to display the detail template for every record as a pop up and how to pass the id of the record to the detail template pop up, and by the way i don't show the id in the grid as a column, it's in the data but not shown.

<kendo-grid
k-options="voters.gridOptions"
k-ng-delay="voters.gridOptions">
</kendo-grid>

 

vm.gridOptions = {
dataSource: {
type: "json",
serverPaging: true,
serverSorting: true,
serverFiltering: true,
pageSize: 13,
transport: {
read:
function (e) {
query.page = e.data.page;
data.getResults(query).
then(function (data) {
e.success(data);
});
}
},
schema: {
data: function(e) {
return e.data.data.data;
},
total: function(e) {
return e.data.data.total;
}
}
},
columns: [
{ field: "full_name", title: "​Name" },
{ field: "birth_date", title: "​Birthdate" },
{ field: "profession", title: "Profession" },
],
pageable: true
};

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 11 Sep 2015, 09:07 AM

Hello shalaby,

 

You can approach similar to the one demonstrated in the following demo:

 

http://demos.telerik.com/kendo-ui/grid/custom-command

 

Where you can get the dataItem in the click event handler of the custom button, then you can displayed the data in whenever format you need.

 

Please check the following sample that you can build upon your app:

 

http://dojo.telerik.com/iZaJa

 

Regards,
Kiril Nikolov
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
shalaby
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or