Hi Greg,
Thank you for using Syncfusion products.
Query #1 : In the hierarchical grid is there any way to prevent the expanding of certain rows?
We can prevent the expanding of the rows in hierarchical grid by handling OnRecordExpanding event. Please refer to the following code snippets:
<%=Html.Syncfusion().Grid
("GridSrc")
. . . . .
.ClientSideEvents(eve =>
{
eve.OnRecordExpanding("OnExpanding");
})
.ChildGrid(child =>
{
. . . . .
.ToChildGridTemplate());
})
%>
[JavaScript]
For your convenience , we have prepared the sample and the same can be downloaded from the following link:
Sample397622127.zip
Note: If you want to run the sample in MVC3, change the configuration manager as Debug_MVC3/Release_MVC3.To briefly know about that steps please kindly refer this document link.
How to Switch between MVC2 to MVC3
Query #2 : I'd like to allow only child grids with two or more rows to be expandable.
In your scenario , we need to get the child record count to cancel the expanding of record. We cannot get the child records count in expanding event. We can only get the record count of child grid after expanding.
Please let us know if you have any other queries.
Regards,
Eswari.S