Hi Michael,
Greetings from Syncfusion support.
We suggest you to add a class “HideDetailIcon” for the Grid row having empty sub-grid in the RowDataBound event of Grid. And now based on this added row class we can apply styles to hide the corresponding detail td element in Grid. We have prepared a sample based on this scenario, please download the sample from the link below,
Please refer the codes below,
| <style> .e-row.HideDetailIcon .e-detailrowcollapse { pointer-events:none; } .e-row.HideDetailIcon .e-detailrowcollapse .e-dtdiagonalright{ display:none; }</style>
<GridEvents RowDataBound="RowDataBound" TValue="EmployeeData"></GridEvents>
public void RowDataBound(RowDataBoundEventArgs<EmployeeData> args)
{
var i = Orders.Where(g=>g.EmployeeID.Equals(args.Data.EmployeeID));
if (i.Count() == 0)
{
args.Row.AddClass(new string[] { "HideDetailIcon" });
}
}
|
Please get back to us if you need further assistance.
Regards,
Renjith Singh Rajendran