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 WithEnd SubThe 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.
In that case, I recommend that you create a small sample project which demonstrates this behavior and Submit an incident to Infragistics Developer Support so they can check it out. It sounds like a bug to me.
Apologies for the late response. I used the CellExported event as you suggested, but I am getting the same results. My border settings are still overwritten as they were when I use the CellExporting event. The .FormatString and .Alignment properties work, but not the .Top/Bottom/Left/RightBorderStyle properties.
What next?
Thanks again.
This probably isn't working because CellExporting fires BEFORE the grid exports the cell. Therefore, the grid exporter will aply border colors to the cell that overwrite your settings. So you probably have to use CellExported, instead.