Hi Ñêw,
Thank you for using Syncfusion controls.
We have prepared a sample to achieve your requirement to add the stacked header. We have attached the sample and UG documentation link for your reference. If your requirement is not achieved with the below details, please provide more details about your requirement. It will help us to investigate further and provide earlier prompt solution.
Please refer the below code snippet.
//Creating object for a stacked header row.
var stackedHeaderRow1 = new StackedHeaderRow();
//Adding stacked column to stacked columns collection available in stacked header row object.
stackedHeaderRow1.StackedColumns.Add(new StackedColumn() { ChildColumns ="OrderID,OrderDate", HeaderText = "Order Details" });
stackedHeaderRow1.StackedColumns.Add(new StackedColumn() { ChildColumns ="CustomerID,ContactNumber,", HeaderText = "Customer Details" });
stackedHeaderRow1.StackedColumns.Add(new StackedColumn() { ChildColumns ="ProductName,Quantity,UnitPrice,ShipCountry", HeaderText = "Product Details" });
//Adding stacked header row object to stacked header row collection available in SfDataGrid.
sfDataGrid.StackedHeaderRows.Add(stackedHeaderRow1); |
Also, please find the below sample and UG link.
Please let us know, if you require further assistance on this.
Regards,
Gowtham