In hierarchical grid where we have (number of columns in parent) < (number of columns in child), for the difference in column number we get Column1, Column2 in the header (See B1,C1,D1,E1,F1 cells in the snapshot).
I have attached the snapshot below.
Hello Tapas,
Thank you for the sample data. The GridExcelExporter uses the Excel Library under the hood. So when you are exporting the igHierarchicalGrid with child band that has more columns than the root one, the default behavior of the Excel Library is to assign a default value if there is no defined one in the columns property of igHierarchicalGrid.
I have created and attached a sample that uses the exportEnding event to set manually the columns headers.
Looking forward to hearing from you.
0045.Sample.zip
In my code,I have hierarchical grid which is having only 1 column (Name) in main or parent grid which is "Bonet Robert" and under that grid,I do have one more grid with only one column(status) which is "A" and under "A" , I have one more grid which is having all other columns like "Address,Billing name,region" etc.
Now when I export this to excel ,I get column 1 ,column 2 and so on for the main grid which is having only 1 column "Name" .
you can match these values with the excel.
var northwind = {
"results": [
{
"Name": "Bonet Robert",
ProjectStatus: [
"ProjectStatus": "A",
Orders: [
"CSA": "18ps3021-19", "CustomerBillingName": "Ernsh", "ServiceAddress": "RW Electric",
"Region": "DPSO", "ProjName": "ALLCONNECT",
"ProjectTotal": "1000"
}
]
} ] }]}
Thank you for posting in our community.
Usually this happens when the header text of the column is omitted in the columns array.
If this is not your case, then please provide more information about the behavior leading to your issue. A working sample will be much appreciated.
Kind regards,Martin