How to open a pop-up window with a kendui grid

I am trying to open a popup with details about the kendoUI grid entry.

I saw this sample: http://demos.kendoui.com/web/grid/detailtemplate.html

But instead of a grid, I would like to open a popup that conveys the identifier of the selected record.

How can i do this?

+4
source share
3 answers

Kendo Grid has its own pop-up editing form that takes care of this and can also be customized using a template.

http://demos.telerik.com/kendo-ui/grid/editing-popup

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-editable.template

+3
source

Have you seen an example of a custom popup?

http://demos.kendoui.com/web/grid/custom-command.html

+2
source

Pretty simple. Subscribe to the onChange event and report the selected id. I assume you mean attribute identifier.

function onChange(arg) { var selected = $.map(this.select(), function(item) { return $(item).attr("id"); }); alert(selected); } $(document).ready(function() { $("#grid").kendoGrid({ dataSource: { data: createRandomData(50), pageSize: 5 }, change: onChange, columns: [ { field: "FirstName", title: "First Name" }, { field: "LastName", title: "Last Name" }, { field: "Age" } ] }); });​ 
+1
source

Source: https://habr.com/ru/post/1416373/


All Articles