I have a Hierarchical DataGrid that is created in a class then displayed dynamically to the form. I am unable to get the ExpandCollapseCommandName to work on postback in the ItemCommand Event below.
What I would like to do is to GetDataKeyValue() of the parent row when a parent row is expanded
private void ActiveBatchesRadGrid_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName)
{
GridTableView _gridTableView = (GridTableView)e.Item.OwnerTableView;
}
if (e.CommandName == RadGrid.ExportToExcelCommandName)
{
GridTableView _gridTableView = (GridTableView) e.Item.OwnerTableView;
_gridTableView.GetColumn("PolicyEditRecord").Visible = false;
_gridTableView.GetColumn("PolicyDeleteRecord").Visible = false;
this.__activeBatchesRadGrid.MasterTableView.HierarchyDefaultExpanded = true;
}
if (e.CommandName == RadGrid.ExpandCollapseCommandName)
{
e.Item.Selected = !e.Item.Expanded;
}
}
What I would like to do is to GetDataKeyValue() of the parent row when a parent row is expanded