I was trying to format the date in the grid.
The grid uses a editortemplate for editing date.
@model DateTime
@{
}
@Html.TextBoxFor(model => model, string.Format("{0:d}", Model), new { disabled="true" })
The date never gets formatted.
It always defaults to this format in the grid:
17 2012 13:36:07 GMT-0500 (Central Daylight Time)
On postback, this causes ModelState to return error.
The grid uses a editortemplate for editing date.
@model DateTime
@{
}
@Html.TextBoxFor(model => model, string.Format("{0:d}", Model), new { disabled="true" })
The date never gets formatted.
It always defaults to this format in the grid:
17 2012 13:36:07 GMT-0500 (Central Daylight Time)
On postback, this causes ModelState to return error.