Here is the definition for my grid. To help discover the source of my problem, I commented out the body of the js functions 'CommitteeMoveUp' and 'CommitteeMoveDn'. The event handler 'CommitteesGridDataBound' only expands the first row.
Hopefully you can see what I'm doing wrong.
@(Html.Kendo().Grid<
CLIENT.Website.Models.CommiteeDetailViewModel
>()
.Name("CommitteesGrid")
.Columns(columns =>
{
columns.Bound(c => c.Name).Width(200);
columns.ForeignKey(p => p.ChairMbrId,
(System.Collections.IEnumerable)ViewData[Constants.ViewDataTypes.Members], "Id", "Name").Width(200);
columns.Bound(c => c.ChairMbrEmail).Width(200);
columns.Bound(c => c.IncludeExecSecr).Width(120);
columns.Command(command =>
{
command.Custom(SiteAdministrationResources.ManageCommittees_Committees_View_Up_Btn).Click("CommitteeMoveUp");
command.Custom(SiteAdministrationResources.ManageCommittees_Committees_View_Down_Btn).Click("CommitteeMoveDn");
command.Edit();
command.Destroy();
});
})
.ToolBar(toolBar =>toolBar.Create())
.ClientDetailTemplateId("CommitteeMembersTemplate")
.HtmlAttributes(new { style = "height: 705px;" })
.Events(events => events.DataBound("CommitteesGridDataBound"))
.Scrollable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(false)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Events(events => events.Error("error_handler"))
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.Id).Editable(false);
model.Id(p => p.SortOrder);
model.Field(p => p.SortOrder).Editable(false);
})
.Read(read => read.Action("_GetCommitteeItems", "ManageCommittees").Type(HttpVerbs.Get))
.Create(create => create.Action("_CreateCommittee", "ManageCommittees").Type(HttpVerbs.Post))
.Update(update => update.Action("_UpdateCommittee", "ManageCommittees").Type(HttpVerbs.Post))
.Destroy(update => update.Action("_RemoveCommittee", "ManageCommittees").Type(HttpVerbs.Post))
)
)