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

Problem kendo grid edit popup

2 Answers 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brayan
Top achievements
Rank 1
Brayan asked on 18 Apr 2012, 03:44 PM
 I have problem with de popup editable i have the next code is equals that example to kendo,but does not work:

<div id="example" class="k-content">
      <div id="grid">
      </div>
      <script type="text/javascript">
            $(document).ready(function () {
                  var crudServiceBaseUrl = "http://demos.kendoui.com/service",
                        dataSource = new kendo.data.DataSource({
                              transport: {
                                    read: {
                                          url: crudServiceBaseUrl + "/Products",
                                          dataType: "jsonp"
                                    },
                                    update: {
                                          url: crudServiceBaseUrl + "/Products/Update",
                                          dataType: "jsonp"
                                    },
                                    destroy: {
                                          url: crudServiceBaseUrl + "/Products/Destroy",
                                          dataType: "jsonp"
                                    },
                                    create: {
                                          url: crudServiceBaseUrl + "/Products/Create",
                                          dataType: "jsonp"
                                    },
                                    parameterMap: function (options, operation) {
                                          debugger;
                                          if (operation !== "read" && options.models) {
                                                return { models: kendo.stringify(options.models) };
                                          }
                                    }
                              },
                              batch: true,
                              pageSize: 30,
                              schema: {
                                    model: {
                                          id: "ProductID",
                                          fields: {
                                                ProductID: { editable: false, nullable: true },
                                                ProductName: { validation: { required: true} },
                                                UnitPrice: { type: "number", validation: { required: true, min: 1} },
                                                Discontinued: { type: "boolean" },
                                                UnitsInStock: { type: "number", validation: { min: 0, required: true} }
                                          }
                                    }
                              }
                        });


                  $("#grid").kendoGrid({
                        dataSource: dataSource,
                        pageable: true,
                        height: 400,
                        toolbar: ["create"],
                        columns: [
                            { field: "ProductName", title: "Product Name" },
                            { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "150px" },
                            { field: "UnitsInStock", title: "Units In Stock", width: "150px" },
                            { field: "Discontinued", width: "100px" },
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "210px"}],
                        editable: "popup"
                  });
            });
      </script>
</div>
look at the  image , the file attached, the popup does not work, 

2 Answers, 1 is accepted

Sort by
0
Brayan
Top achievements
Rank 1
answered on 18 Apr 2012, 03:47 PM
the problem is he popup editable does not work , what is the problem , the code there are correct ?

0
Trevor
Top achievements
Rank 1
answered on 04 Jul 2012, 01:31 PM
I have this same problem.  I think it has to do with different versions of kendo or jquery.  Does anyone have a solution?
Tags
Grid
Asked by
Brayan
Top achievements
Rank 1
Answers by
Brayan
Top achievements
Rank 1
Trevor
Top achievements
Rank 1
Share this question
or