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

Free Support Forum - aspose.com

Desktop Grid - Find out Changed rows when using ImportDataTable() function

Hi

I am using desktop grid. My requirement is to:

1. Show Column Headers (A, B, C, D, E…) in grid
2. Show Datatable’s Header in the first row
3. To use a function which returns only those rows which have been changed since gridload or since last acceptchanges.

I have Imported a datatable using following statement.
grdDataEntry.Worksheets(0).ImportDataTable(ldtMergInvestor, True, 0, 0)

Also, i have attached a screen shot to make the point more clear.
With that I fullfilled the requirements of my first 2 points. But as I imported the datatable (not databind), it does not give me changed rows/columns with GetChanges function of datatable.

Can we find out only changed rows/columns when using ImportDataTable function?

Hi,

I think you may try to utilize and handle GridDesktop_CellDataChanged event to get the changed rows and columns information when you import a datatable using Worksheet.ImportDataTable() function.

e.g..,

Private Sub GridDesktop1_CellDataChanged(ByVal sender As System.Object, ByVal e As Aspose.Grid.Desktop.CellEventArgs) Handles GridDesktop1.CellDataChanged

MessageBox.Show("Change Row: " & e.Cell.Row)

MessageBox.Show("Change Column: " & e.Cell.Column)

'.........................

'If e.Cell.Row > ........ Then

' your code goes here.

'End If

End Sub

Thank you.

Ok, Thanks Amjad