Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
710
Export selected rows to excel
posted

Hello, I have a ultragrid, and this is grouped by a column, and when i select one group, y need export to excel only rows that are selected.

I want to export both the parent and the children, but only for rows where the parent row is selected.

How i can this?

Tanks

Parents
  • 1210
    Offline posted

    I expected this to work:

        Private Sub UltraGridExcelExporter1_RowExporting(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.RowExportingEventArgs) Handles UltraGridExcelExporter1.RowExporting

            If Not e.GridRow.Selected Then

                e.Cancel = True

            End If

        End Sub

     

    But it did not. For some reason e.GridRow.Selected was always false so all row where skipped.

    Changing it to this and it works (but you may have to change the code to fit your situation):

        Private Sub UltraGridExcelExporter1_RowExporting(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.RowExportingEventArgs) Handles UltraGridExcelExporter1.RowExporting

            If Not UltraGrid1.Rows(e.GridRow.Index).Selected Then

                e.Cancel = True

            End If

        End Sub

    Trausti

Reply Children