I have a very odd problem, my editable grid has a date field (ExpiryDate), so there is one in every line (row).
If i edit a row and i change the contents of the datefield, i 'lose' the variable ExpiryDate from my POST vars completely. (if i dont edit the date field, but i edit other fields (text) my code works perfectly.)
According to Firebug, the parameter called ExpiryDate is not even in the Post values (unless of course i didnt trigger the date picker flyout.
Obviously there is something i'm doing wrong. Please could someone take a look.
This happens if i edit inline, popup or incell.
Maybe i should be initializing the datepicker evertime i use it? but where?
Please help?
(i have a php/mysql datasoure and CRUD setup)
$("#grid").kendoGrid({
dataSource: {
transport: {
read: "data/users.php",
update: {
url: "data/users.php",
type: "POST"
},
destroy: {
url: "data/users.php",
type: "DELETE"
},
create: {
url: "data/users.php",
type: "PUT"
}
},
error: function(e) {
alert(e.responseText);
},
schema: {
data: "data",
model: {
id: "ID",
fields: {
EmailAddress: { validation: { required: true}, type: "string" },
FirstName: { validation: { required: true}, type: "string" },
SecondName: { validation: { required: true}, type: "string" },
AdvertType: { validation: { required: true}, type: "string"},
SubscriptionType: { validation: { required: true}, type: "string" },
ActivationCode: { validation: { required: true}, type: "string" },
ExpiryDate: { editable: true, type: "date", parse: function(value) { return kendo.toString(value) } }
}
}
}
},
pageable: true,
height: 400,
toolbar: ["create"],
columns: [
{ field: "EmailAddress", width: "250px" },
{ field: "FirstName", width: "150px" },
{ field: "SecondName", width: "150px" },
{ field: "AdvertType", width: "100px" }, //, editor: advertTypeEditor },
{ field: "SubscriptionType", width: "100px" },
{ field: "ActivationCode", width: "150px" },
{ field: "ExpiryDate", width: "150px", format: "{0:dd-MM-yyyy}" },
{ command: ["edit", "destroy"], title: " ", width: "200px" }
],
//editable: "popup",
editable: "incell",
detailTemplate: kendo.template($("#template").html()),
detailInit: detailInit,
toolbar: ["create", "save", "cancel"],
});
If i edit a row and i change the contents of the datefield, i 'lose' the variable ExpiryDate from my POST vars completely. (if i dont edit the date field, but i edit other fields (text) my code works perfectly.)
According to Firebug, the parameter called ExpiryDate is not even in the Post values (unless of course i didnt trigger the date picker flyout.
Obviously there is something i'm doing wrong. Please could someone take a look.
This happens if i edit inline, popup or incell.
Maybe i should be initializing the datepicker evertime i use it? but where?
Please help?
(i have a php/mysql datasoure and CRUD setup)
$("#grid").kendoGrid({
dataSource: {
transport: {
read: "data/users.php",
update: {
url: "data/users.php",
type: "POST"
},
destroy: {
url: "data/users.php",
type: "DELETE"
},
create: {
url: "data/users.php",
type: "PUT"
}
},
error: function(e) {
alert(e.responseText);
},
schema: {
data: "data",
model: {
id: "ID",
fields: {
EmailAddress: { validation: { required: true}, type: "string" },
FirstName: { validation: { required: true}, type: "string" },
SecondName: { validation: { required: true}, type: "string" },
AdvertType: { validation: { required: true}, type: "string"},
SubscriptionType: { validation: { required: true}, type: "string" },
ActivationCode: { validation: { required: true}, type: "string" },
ExpiryDate: { editable: true, type: "date", parse: function(value) { return kendo.toString(value) } }
}
}
}
},
pageable: true,
height: 400,
toolbar: ["create"],
columns: [
{ field: "EmailAddress", width: "250px" },
{ field: "FirstName", width: "150px" },
{ field: "SecondName", width: "150px" },
{ field: "AdvertType", width: "100px" }, //, editor: advertTypeEditor },
{ field: "SubscriptionType", width: "100px" },
{ field: "ActivationCode", width: "150px" },
{ field: "ExpiryDate", width: "150px", format: "{0:dd-MM-yyyy}" },
{ command: ["edit", "destroy"], title: " ", width: "200px" }
],
//editable: "popup",
editable: "incell",
detailTemplate: kendo.template($("#template").html()),
detailInit: detailInit,
toolbar: ["create", "save", "cancel"],
});