Hi I am new to Kendo UI grid with ASP.Net MVC razor, I am trying to create a 3 column grid with the first column is non-editable and the other two are editable with numeric text input, this is the code i have with me right now, what else to add ? will something like .Editable(editable => editable.Mode(GridEditMode.InLine)) help but how to make the first column read only
@Html.Kendo().Grid(Model.CpfPayableYearlyDetail.CpfPayableMonthlyDetails).Name("CpfPayableMonthlyDetails").Columns(columns =>
{
columns.Bound(p => p.Month).Title("Month");
columns.Bound(p => p.OrdinaryWagePaid).Title("Ordinary Wages (OW)");
columns.Bound(p => p.AdditionalWagePaid).Title("Additional Wages (AW)");
})
I kind of figured out how to achieve this
@Html.Kendo().Grid(Model.CpfPayableYearlyDetail.CpfPayableMonthlyDetails).Name("CpfPayableMonthlyDetails").Columns(columns =>
{
columns.Bound(p => p.Month).Title("Month");
columns.Bound(p => p.OrdinaryWagePaid).Title("Ordinary Wages (OW)").ClientTemplate(Html.Kendo().NumericTextBox().Name("OW").ToClientTemplate().ToHtmlString());
columns.Bound(p => p.AdditionalWagePaid).Title("Additional Wages (AW)").ClientTemplate(Html.Kendo().NumericTextBox().Name("AW").ToClientTemplate().ToHtmlString());
}).Editable(editable => editable.Mode(GridEditMode.InCell)).DataSource(dataSource => dataSource
.Ajax().Model(model => model.Id(m => m.Month)))
but there is a problem the values from the datasource are not getting bound to the editbale columns/ cells