We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Desktop Grid - Extra Rows and Column

Hi

I am using Desktop grid. I am importing data into grid by datatable. The issue is when I import data into grid, it automatically adds some additional blank rows and columns as shown in the attached file.

Code:
grdDataEntry.Worksheets(0).ImportDataTable(ldtAllData, True, 0, 0)

Could you tell me how could I avoid having those blank rows/columns or how could i remove them?

Hi,

Please add the two lines (given below) of code before importing the datatable to the worksheet for your requirements.

e.g..,

grdDataEntry.Worksheets(0).RowsCount = ldtAllData.Rows.Count

grdDataEntry.Worksheets(0).ColumnsCount = ldtAllData.Columns.Count

grdDataEntry.Worksheets(0).ImportDataTable(ldtAllData, True, 0, 0)


Thank you.