I have a grid set up with a child grid. My child grid has two command buttons in each row, however, they are not always working. When the grid loads I have one row with the child grid expanded. The buttons work then but when I expand another row, the buttons in the first row don't work. Even if I collapse all the rows and then expand the first row again, I am still not able to use the buttons. They seem to only work again when I refresh the page.
List<object> commands = new List<object>();
commands.Add(new { type = "Details", buttonOption = new { iconCss = "e-icons e-details", cssClass = "e-flat" }, id = "viewDetails" });
commands.Add(new { type = "Remove", buttonOption = new { iconCss = "e-icons e-delete", cssClass = "e-flat" } });
List<object> toolbarItems = new List<object>();
toolbarItems.Add("Search");
List<object> parentCommands = new List<object>();
parentCommands.Add(new { type = "Add", buttonOption = new { iconCss = "e-icons e-add", cssClass = "e-flat" }, id = "addVersion" });
var ChildGrid = new Syncfusion.EJ2.Grids.Grid()
{
DataSource = new Syncfusion.EJ2.DataManager() { Json = ViewBag.DataSource2.ToArray(), Adaptor = "RemoteSaveAdaptor", RemoveUrl = "/DataGrid/RemoveVersion" },
QueryString = "RuleId",
CommandClick = "commandClick",
EditSettings = new Syncfusion.EJ2.Grids.GridEditSettings() { AllowAdding = true, AllowDeleting = true, Mode = Syncfusion.EJ2.Grids.EditMode.Dialog, ShowDeleteConfirmDialog = true },
AllowPaging = true,
RowHeight = 100,
TextWrapSettings = new Syncfusion.EJ2.Grids.GridTextWrapSettings() { WrapMode = Syncfusion.EJ2.Grids.WrapMode.Header },
AllowFiltering = true,
PageSettings = new Syncfusion.EJ2.Grids.GridPageSettings() { PageSize = 5, PageSizes = true },
AllowSorting = true,
ShowColumnMenu = true,
FilterSettings = new Syncfusion.EJ2.Grids.GridFilterSettings() { Type = Syncfusion.EJ2.Grids.FilterType.Excel },
AllowSelection = true,
Toolbar = toolbarItems,
Columns = new List<Syncfusion.EJ2.Grids.GridColumn>
{
new Syncfusion.EJ2.Grids.GridColumn(){Field="RuleFileRuleVersion.VersionNumber", IsPrimaryKey=true, IsIdentity=true, HeaderText="Version Id"},
new Syncfusion.EJ2.Grids.GridColumn(){Field="CurrentStart", Type="date", Format="yMd", HeaderText="Current-Start"},
new Syncfusion.EJ2.Grids.GridColumn(){Field="CurrentEnd", Type="date", Format="yMd", HeaderText="Current-End"},
new Syncfusion.EJ2.Grids.GridColumn(){Field="NewStart", Type="date", Format="yMd", HeaderText="New Business-Start"},
new Syncfusion.EJ2.Grids.GridColumn(){Field="NewEnd", Type="date", Format="yMd", HeaderText="New Business-End"},
new Syncfusion.EJ2.Grids.GridColumn(){Field="RenewStart", Type="date", Format="yMd", HeaderText="Renewal-Start"},
new Syncfusion.EJ2.Grids.GridColumn(){Field="RenewEnd", Type="date", Format="yMd", HeaderText="Renewal-End"},
new Syncfusion.EJ2.Grids.GridColumn(){Field="RuleFileRuleVersion.Enabled", AllowEditing=true, HeaderText="Enabled", EditType = "booleanedit", Type="boolean", DisplayAsCheckBox=true, Filter=new {type="CheckBox"}},
new Syncfusion.EJ2.Grids.GridColumn(){Field="RuleFileRuleVersion.Level", AllowEditing=true, HeaderText="Level"},
//new Syncfusion.EJ2.Grids.GridColumn(){Field="ParametersSet", AllowEditing=false, HeaderText="Has Parameters", DisplayAsCheckBox=true, Filter=new {type="CheckBox"} },
new Syncfusion.EJ2.Grids.GridColumn(){Field="RuleId", AllowEditing=false, HeaderText="Rule Id", Visible=false, IsIdentity=true},
new Syncfusion.EJ2.Grids.GridColumn(){HeaderText="Manage Records", Commands=commands}
}
};
}