Hi,
Does anyone see any problems with the following code?
Dim exporter As UltraGridExcelExporter = New UltraGridExcelExporter()
Dim tempGrid As UltraGrid = New UltraGrid()
tempGrid.DataSource = dataTable
tempGrid.DataBind()
exporter.Export(tempGrid, fileName)
My dataTable has rows and is correctly configured. The issue is that all I get after the export is an empty file. The DataBind call has no affect.
Thank you,
Rick
Rick,I have seen one major issue with your code that grid is not added as Control on Form, that is why you are not getting any rows in exported excel file, what you need to do is just use the following code to add Grid on Form as control: Me.Controls.Add(tempGrid)and it will work for you i.e. excel will contain rows from datatable.Thank you.Bunty :)
That worked. Thank you!