Hi! First of all I want to thank you for creating KendoUI.
I'm having problem with editable grid here with JSON response from servers... When I click Create it throws an error in Chrome saying Uncaught ReferenceError: firstName is not defined
This only happens when I'm inserting an email column. But it becomes Okay when I change it back to string. here's the code:
I hope you can help me with this... Thanks!
I'm having problem with editable grid here with JSON response from servers... When I click Create it throws an error in Chrome saying Uncaught ReferenceError: firstName is not defined
This only happens when I'm inserting an email column. But it becomes Okay when I change it back to string. here's the code:
<script> var blankData; $(document).ready(function () { var dataSource = new kendo.data.DataSource({ transport: { read: {dataType: "json", type: "POST",data: {"SQLCMD":"SELECT * FROM gridTest","Table":["firstName","nickName","lastName"],"PrimaryKey":"PeopleID"} // this JSON data serves as parameters when returning data from the database}, update: { type: "POST" }, destroy: { type: "POST" }, create: { type: "POST" } }, // determines if changes will be send to the server individually or as batch batch: true, //... pageSize: 30, data: blankData, autoSync: true, schema: { model: { id: "PeopleID", fields: {"PeopleID":{"editable":false,"nullable":true},"firstName":{"type":"email","validation":{"required":true},"nullable":false},"nickName":{"type":"string","validation":{"required":true},"nullable":false},"lastName":{"type":"string","validation":{"required":true},"nullable":false}} } } }); $("#grid").kendoGrid({ dataSource: dataSource, pageable: true, height: 260, toolbar: ["create"], columns: [{"field":"firstName","title":"First name"},{"field":"nickName","title":"Nick Name"},{"field":"lastName","title":"Last name"},{"command":"destroy","title":" ","width":"110px"}] , editable: true }); }); </script>
I hope you can help me with this... Thanks!