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
65
Cannot Set BorderLineStyle
posted

Hi,

I  wrote the following code:

Private Sub UltraGridExcelExporter1_CellExporting(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.ExcelExport.CellExportingEventArgs) Handles UltraGridExcelExporter1.CellExporting
    With e.CurrentWorksheet.Columns(e.CurrentColumnIndex).CellFormat
        .TopBorderStyle = Infragistics.Excel.CellBorderLineStyle.Thick
        .BottomBorderStyle = Infragistics.Excel.CellBorderLineStyle.Thick
        .LeftBorderStyle = Infragistics.Excel.CellBorderLineStyle.Thick
        .RightBorderStyle = Infragistics.Excel.CellBorderLineStyle.Thick
    End With
End Sub

The above code is ignored for all cells in every row that has been populated however, it is applied to the cells in all of the remaining empty rows in the spreadsheet. It seems the populated rows get their formating from the UltraWinGrid and ignore any changes to their formatting, however, the remaining rows are formatted as desired. Please see the attached spreasheet.

How can I override the grid's formatting so that I can define my own format on the populated rows?

 

Thanks in advance.

test.infragistics.forums.zip