For those Telerik gurus out there, 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.
private void ActiveBatchesRadGrid_ItemCommand(object source, GridCommandEventArgs e)
{
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.
PS. I know the code above does not give me the DataKeyValue.
I found the problem. HierarchyLoadMode = GridChildLoadMode.Client should have been set to HierarchyLoadMode = GridChildLoadMode.ServerBind