バージョン

CurrentColumnIndex プロパティ (ExcelExportEventArgs)

Excel ワークシート内の、現在エクスポート中の列の0から始まるインデックス。
シンタックス
'宣言
 
Public Property CurrentColumnIndex As Integer
public int CurrentColumnIndex {get; set;}
使用例
Private Sub MyGridExporter_CellExporting(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.CellExportingEventArgs) Handles MyGridExporter.CellExporting
    If e.CurrentColumnIndex Mod 2 = 0 Then
        e.GridRow.Cells(e.GridColumn).Appearance.BackColor = Color.AliceBlue
    End If
End Sub

Private Sub MyGridExporter_CellExported(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.CellExportedEventArgs) Handles MyGridExporter.CellExported
    If e.CurrentColumnIndex Mod 2 = 0 Then
        Dim tmCF As IWorksheetCellFormat = e.CurrentWorksheet.Rows(e.CurrentRowIndex).Cells(e.CurrentColumnIndex).CellFormat
        tmCF.BottomBorderStyle = CellBorderLineStyle.SlantedDashDot
        tmCF.TopBorderStyle = CellBorderLineStyle.SlantedDashDot
        tmCF.LeftBorderStyle = CellBorderLineStyle.SlantedDashDot
        tmCF.RightBorderStyle = CellBorderLineStyle.SlantedDashDot
    End If
End Sub
private void CellExportingEH(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.CellExportingEventArgs e)
{
	if(e.CurrentColumnIndex%2==0)
		e.GridRow.Cells[e.GridColumn].Appearance.BackColor = Color.AliceBlue;
}

private void CellExportedEH(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.CellExportedEventArgs e)
{
	if(e.CurrentColumnIndex%2==0)
	{
		IWorksheetCellFormat tmCF = e.CurrentWorksheet.Rows[e.CurrentRowIndex].Cells[e.CurrentColumnIndex].CellFormat;
		tmCF.BottomBorderStyle = tmCF.TopBorderStyle = tmCF.LeftBorderStyle = tmCF.RightBorderStyle = CellBorderLineStyle.SlantedDashDot;
	}
}
参照