In the main grid , I have specified the ClientDetailTemplateId("Temptemplate")
<script id="Temptemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid<NIMROD.Models.Test>()
.Name("Testid#")
.Columns(columns =>
{
columns.Bound(o => o.test1).Title("Test");
columns.Bound(o => o.test1Qty).HtmlAttributes(new { style = "text-align:right" });
columns.Bound(o => o.test2Qty).HtmlAttributes(new { style = "text-align:right" });
})
.Editable(ed => ed.Mode(GridEditMode.InCell))
.Selectable(sel => sel.Mode(GridSelectionMode.Single))
.Events(ev =>{
ev.Edit("edit");
})
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.Read(read => read.Action("details", "Order"))
.Update("UKEditPhaseReviewDrops", "Order")
.Model(model => { model.Id(p => p.id); })
.Events(ev => {
ev.RequestEnd("oncomplete");
ev.Error("error_handler"); } )
)
.Events(ev =>{
ev.Edit("onPhaseReviewedit");
})
.Events(ev => ev.Save("onsave"))
.ToClientTemplate())
</script>
Our requirement test1qty & test2qty cell should be editable or readonly based on condition .
Validation should be done for each cell by calling the action result ,Validation message should be displayed as javascript alert
Thanks In Advance
<script id="Temptemplate" type="text/kendo-tmpl">
@(Html.Kendo().Grid<NIMROD.Models.Test>()
.Name("Testid#")
.Columns(columns =>
{
columns.Bound(o => o.test1).Title("Test");
columns.Bound(o => o.test1Qty).HtmlAttributes(new { style = "text-align:right" });
columns.Bound(o => o.test2Qty).HtmlAttributes(new { style = "text-align:right" });
})
.Editable(ed => ed.Mode(GridEditMode.InCell))
.Selectable(sel => sel.Mode(GridSelectionMode.Single))
.Events(ev =>{
ev.Edit("edit");
})
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.Read(read => read.Action("details", "Order"))
.Update("UKEditPhaseReviewDrops", "Order")
.Model(model => { model.Id(p => p.id); })
.Events(ev => {
ev.RequestEnd("oncomplete");
ev.Error("error_handler"); } )
)
.Events(ev =>{
ev.Edit("onPhaseReviewedit");
})
.Events(ev => ev.Save("onsave"))
.ToClientTemplate())
</script>
Our requirement test1qty & test2qty cell should be editable or readonly based on condition .
Validation should be done for each cell by calling the action result ,Validation message should be displayed as javascript alert
Thanks In Advance