Hi,
i have been trying to get row count on the worksheet so that i can add a row at the end and include few details.
if it were a FLAT grid then i get the row count from grid rows, but i have Hierachical and users can also select OutLookgroupby feature.
here i am struggling to get the last row of the worksheet.
UltraWebGridExcelExporter1.Export(Ultrawebgrid1, WorkSheet, 5, 0)
can anyone tell how to get the row count of the worksheet?
Note: i tried WorkSheet.Rows.Count; its private readonly property i can't access it.
thank you,
Hello Rumen,
Thanks for Updation. I am not Exporting data from Grid. Actually i am importing a Excel template into Infragistic Worksheet then need to insert a row in between two rows. After that finally export data to Excel file. Please Suggest.
Thanks,
Rohit Kainth
Competent Software Pvt. Ltd.
New Delhi, INDIA
Hello Rohit,
Just create a new dummy datasource based on the original one you have (you can copy the schema (fields) and then the rows one by one) and then just insert an empty row (a row with String.Empty for each individual value) between the two rows you need, then rebind the grid to the new datasource piror to exporting.
Please tell me procedure to insert a blank row between two rows in Infragistic Excel worksheets
Thanks
Handle the WebGridExcelExporter's RowExported event and keep the maximum e.RowIndex you see around in a member variable; when the export is finished that will be the number of WorksheetRows.
The WorksheetRowsCollection always assumes there can be 65,536 WorksheetRows in itself, so the first time you ask for row number 65,000 it will create a WorksheetRow object on demand, so the count of actual WorksheetRow instances maintained internally won't help you find them by indexing, as in a for-loop.