I have a simple implimentation of a WebExcelExporter that exports data in a WebHierarchicalDataGrid.It is a simple task list with values such as TaskTitle, TaskOwner, TaskStatus, & TaskDueDate.When sorting using a column that does not contain any nulls, everything works fine.If sorting with a column that contains some nulls, you get the following result:Object reference not set to an instance of an object.on this line of code:this.WebExcelExporter1.Export(this.WebHierarchicalDataGrid1, wSheet);If, for example, I am sorting by TaskStatus and some of the tasks do not have a value, the WebHierarchicalDataGrid knows how to handle this.... it creates a "group" that has a label something like this: "TaskStatus: (%number%)".The TaskStatus groups that have a value for TaskStatus get a label something like this: "TaskStatus: Active (%number%)", or "TaskStatus: Pending (%number%)", etc...
when you click export, you get the "Object reference not set to an instance of an object." error.
Evidently, the WebHierarchicalDataGrid knows how to show all rows of data, creating a group for those rows that have a null value, but the exported doesn't know how to write them to an XLS?Can the exporter not be programmed to create a group in the XLS like "TaskStatus: (%number%)"?
Hello,
Let me know if you need any further assistance regarding this.
I used the online sample demonstrating the export functionality of the WebHierarchicalDataGrid
http://samples.infragistics.com/2010.2/WebFeatureBrowser/contents.aspx?showCode=true&t=WebHierarchicalDataGrid/WebHierarchicalDataGridExcelExport.aspx~srcview.aspx?path=~srcview.aspx?path=WebHierarchicalDataGrid/WebHierarchicalDataGridExcelExport.src
I used the "Product" table from NorthWind database in order to set NULL data in QuantityPerUnit,UnitPrice and UnitsInStock columns.
I succeeded to export the grid after sorting without any issues.
Can you please modify the sample in order to reproduce the issue?
If it is easier for you, you can upload a simplified example demonstrating the behavior.
Hope hearing from you.
In addition to this thread, I've opened a support request.CAS-48375-87TCDT
If you have a thought or idea though, I'd love to hear it!Thanks