Kendo UI Complete ASP.NET Verison : 2013.3.1316
download the code library from peter post
add the datetime field in the mode
this code library post everything except datetime field.. please help
dattime filed always remians= 01/01/0001 if you change it from datepicker and then post the form to the controller
--------DateTime Filed PostBack value stays 01/01/0001 Issue-------------------
This approach does not work any more with new kendo contorls library i do'nt know if its works for the previous verions.
if you have datetime filed in your model
Model
{
public string UserName { get; set; }
public string UserPhone { get; set; }
public datetime workDate { get; set; } <--this will be 01/01/0001 or Null on postback
}
when you do this your view
columns.Bound(item => item.workDate ).Title("Wok Date").Encoded(true).ClientTemplate("#= WorkDate #" +
"<input type='hidden' name='gridItems[#= index(data) #].WorkDate' value='#= WorkDate #' />");
<input type="submit" value="Save" id="save"/>
Fails on Postback
CreateWorkOrder(WorkOrderContainer model)
{
var mydate =model.workDate; <---- your mydate will be 01/01/0001 Or null always
}
please help any one or if there is other approch to post the data to server where new entry will be made on action result
regards
Shahzad ilyas
download the code library from peter post
add the datetime field in the mode
this code library post everything except datetime field.. please help
dattime filed always remians= 01/01/0001 if you change it from datepicker and then post the form to the controller
--------DateTime Filed PostBack value stays 01/01/0001 Issue-------------------
This approach does not work any more with new kendo contorls library i do'nt know if its works for the previous verions.
if you have datetime filed in your model
Model
{
public string UserName { get; set; }
public string UserPhone { get; set; }
public datetime workDate { get; set; } <--this will be 01/01/0001 or Null on postback
}
when you do this your view
columns.Bound(item => item.workDate ).Title("Wok Date").Encoded(true).ClientTemplate("#= WorkDate #" +
"<input type='hidden' name='gridItems[#= index(data) #].WorkDate' value='#= WorkDate #' />");
<input type="submit" value="Save" id="save"/>
Fails on Postback
CreateWorkOrder(WorkOrderContainer model)
{
var mydate =model.workDate; <---- your mydate will be 01/01/0001 Or null always
}
please help any one or if there is other approch to post the data to server where new entry will be made on action result
regards
Shahzad ilyas