我有一个绑定到网格的 DateTime 字段。当网格进入编辑模式时,日期/时间选择器会显示,但值会从中清除。这迫使用户重新输入日期/时间。知道为什么在触发编辑模式时它的值会被清除吗?
@(Html.Telerik().Grid<ExpenseGridModel>()
.DataBinding(dataBinding => dataBinding.Ajax()
.Select("ExpenseAjaxBinding", "ExpenseEntry")
.Update("ExpenseUpdate", "ExpenseEntry")
)
.Name("ExpensesGrid")
.DataKeys(keys => keys.Add(r => r.id))
.Columns(columns =>
{
columns.ForeignKey(o => o.categoryId, Model.expenseCategories, "Id", "Name");
columns.ForeignKey(o => o.typeId, Model.expenseTypes, "Id", "Name");
columns.Bound(r => r.date);
columns.ForeignKey(o => o.classId, Model.expenseClasses, "Id", "Name");
columns.Bound(r => r.description);
columns.Bound(r => r.amount);
columns.Command(commands =>
commands.Edit()
);
})
)