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
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):
If Not UltraGrid1.Rows(e.GridRow.Index).Selected Then
Trausti
Tanks for your answer, but this only works if don't have any group.
but i need export the selected parent row, and all its childrens.