Hello,
I'm trying to open a popup editor for a grid that resides inside a kendoWindow. I can open the window and display the grid. I can also have an "Add New" button on the grid's toolbar that works, and adds new content to the grid, however, the edit and delete buttons on each row of the grid are not clickable (nothing happens when I click them).
My grid resides inside <div> tags that I open as a kendoWindow via a JavaScript function.
function
Create_Options() {
var
wnd = $(
"#dlgProjectOption"
).kendoWindow({
title:
"Add/Edit Option(s)"
,
modal:
true
,
visible:
false
,
width: 600,
height: 600
}).data(
"kendoWindow"
);
wnd.center().open();
}
Here's my grid markup:
@(Html.Kendo().Grid<
OptionsCountermeasureViewModel
>()
.Name("OptCountermeasure")
.Columns(columns =>
{
columns.Command(command =>
{
command.Edit().Text(" ");
command.Custom(" ").Text("").Click("openRemoveWindow").IconClass("k-icon k-i-close");
}
).Width(120).MinResizableWidth(49).HtmlAttributes(new { style = "text-align: center;" });
columns.Bound(c => c.CountermeasureType).Title("Type");
columns.Bound(c => c.Description);
})
.HtmlAttributes(new { style = "height: 300px; width: 100%;" })
.Scrollable(s => s.Height("auto"))
.Resizable(resize => resize.Columns(false))
.Groupable(false)
.Sortable(true)
.ToolBar(toolbar =>
{
toolbar.ClientTemplateId("GridToolbarTemplateOpt");
})
.Editable(editable => { editable.Mode(GridEditMode.InLine); }) //.TemplateName("_OptionsCountermeasureCreate").DisplayDeleteConfirmation(false); })*/
.Events(e =>
{
e.Edit("grdCountermeasure_OnEdit");
e.Save("grdCountermeasure_OnSave");
})
.DataSource(datasource => datasource
.Ajax()
.PageSize(50)
.Events(events =>
{
events.Error("error_handler");
events.RequestEnd("Countermeasure_onRequestEnd");
})
.Model(model =>
{
model.Id(m => m.CountermeasureId);
model.Field(f => f.CountermeasureTypeId).Editable(true);
model.Field(f => f.Description);
})
.ServerOperation(false)
.Read(read => read.Action("GetOptionCountermeasures", "RRManagement").Data("GetOptionId"))
.Update(update => update.Action("UpdateCountermeasures", "RRManagement"))
.Create(create => create.Action("CreateCountermeasures", "RRManagement"))
.Destroy(destroy => destroy.Action("DeleteCountermeasures", "RRManagement"))
))
Why won't the edit/delete command of a kendo Grid buttons work inside the kendoWindow?
Any help is appreciated. Thanks.
Shawn A.