Hi,
I was able to delete records using below code but not the first record on the grid. Looking at the html in firebug, I found out that for the first row's delete button is directly in the div tag and missing the form tag that has the action. Although, I have provided enough width for the last column, the command buttons are stacked. (Check in the attached display screen). Thanks in advance for any help.
I was able to delete records using below code but not the first record on the grid. Looking at the html in firebug, I found out that for the first row's delete button is directly in the div tag and missing the form tag that has the action. Although, I have provided enough width for the last column, the command buttons are stacked. (Check in the attached display screen). Thanks in advance for any help.
@(Html.Kendo().Grid(Model)
.Name(
"Grid"
)
.HtmlAttributes(
new
{ @style =
"width:500px;"
})
.Editable(editable => editable.Mode(GridEditMode.PopUp).DisplayDeleteConfirmation(
true
)
.TemplateName(
"Grid"
)
.Window(w => w.Title(
"Product"
)
.Name(
"grdWindow"
)
.Animation(
true
)
.HtmlAttributes(
new
{ @style =
"width:500px;"
}).Modal(
true
)))
.Columns(column =>
{
column.Bound(p => p.ProductID).Width(120);
column.Bound(p => p.ProductName).Width(200);
column.Bound(p => p.Color).Width(120);
column.Command(command => { command.Edit(); command.Destroy(); }).Width(420);
})
.Pageable(pager => pager.PageSizes(
true
).PreviousNext(
true
))
.Sortable()
.Selectable()
.DataSource(datasource => datasource
.Server().PageSize(5)
.Update(
"EditProduct"
,
"Home"
)
.Destroy(
"DeleteProduct"
,
"Home"
)
.Model(model => model.Id(p => p.ProductID))
)
)