Private Sub MyGridExporter_RowExporting(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.RowExportingEventArgs) Handles MyGridExporter.RowExporting If e.CurrentRowIndex Mod 2 = 0 Then e.GridRow.Appearance.BackColor = Color.LightSalmon End If End Sub Private Sub MyGridExporter_RowExported(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.RowExportedEventArgs) Handles MyGridExporter.RowExported ' CurrentRowIndex is incremented after the row is exported e.CurrentWorksheet.Rows(e.CurrentRowIndex - 1).CellFormat.TopBorderStyle = CellBorderLineStyle.Thick End Sub
private void RowExportingEH(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.RowExportingEventArgs e) { if(e.CurrentRowIndex%2==0) e.GridRow.Appearance.BackColor = Color.LightSalmon; } private void RowExportedEH(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.RowExportedEventArgs e) { // CurrentRowIndex is incremented after the row is exported e.CurrentWorksheet.Rows[e.CurrentRowIndex-1].CellFormat.TopBorderStyle = CellBorderLineStyle.Thick; }