Hi,
I could not find examples for all scenarios, here's where I'm at in the moment:
- read (mysql local database via php) works fine and as expected
- edit/save/delete throws errors
Software info
The database/php script is built on the kendo examples, SQL is this:
Questions
Volker
I could not find examples for all scenarios, here's where I'm at in the moment:
- read (mysql local database via php) works fine and as expected
- edit/save/delete throws errors
$("#grid").kendoGrid({ dataSource: { transport: { read : { url: "data/product_list.php" , dataType : "json" } , create : { url: "data/product_create.php" , type: "POST" } , update : { url: "data/product_update.php" , type:"POST" } , destroy : { url: "data/product_delete.php" , type: "POST" } }, schema: { data: "data" } , model: { id:"ID" , fields : { ID : { editable : false, nullable : true } , product_name : { editable : false , nullable: true } , name : { required : true } , size : { required : true } , weight : { required : true } , glossy : { required : true } , color : { required : true } } } }, columns: [{ field: "ID" , title : "id" , width: "2em" } , { field: "product_name" , title : "Product" } , { field: "name" , title: "Name" } , { field: "size" , title: "Size" } , { field: "weight" , title: "Weight" } , { field: "glossy" , title: "Shining" } , { field: "color" , title: "Color" } , { title: "" , command: "destroy" , width: "110px" } ] , toolbar : [ { name: "create" , text : "Add New Product" } , "save" , "cancel" ], detailTemplate: kendo.template($("#template").html()), detailInit: detailInit, sortable : { mode : "multiple" , allowUnsort : true } , editable : { update : true , destroy : true , confirmation: "really delete it? \n (press 'Save Changes' to delete it from server!)" }});Software info
- Browser: Safari mac os x 5.1.2, Firefox 9.0.1 mac os x
- Kendo UI v2011.3.1129
- grid is displayed correctly, all buttons show up (remove, toolbar)
- when a) clicking inside a field to edit, b) after saying ok to the confirmation and c) when clicking on the save button, the following error is thrown
- Safari: TypeError: 'undefined' is not an object (evaluating 'this._set.get') on line 4735
Firefox: this._set is undefined on line 4735 - line 4735 is in the uncompressed kendo.all.js (line number is for the a) event, might differ for other events)
- detailInfo datagrid (not shown in code) is read and displayed correctly. Same erroneous behavior...
The database/php script is built on the kendo examples, SQL is this:
SELECT `ID` , CONCAT( name, ' ' , size , ' ' , pages , ' ' , weight , ' ' , glossy , ' ' , color ) AS `product_name` , name , size , pages , weight , glossy , color FROM fp_products;");
- "product_name" is a server-side-calculated field.
- all fields are varchars, only ID is integer (no big amounts:)
Questions
- is there a more complete example for all CRUD grid actions using the LAMP technology (or any other SQL based) stack?
- any hints/tips about where I am heading in the wrong direction are greatly appreciated!
Volker