How can I turn off the verticle grid lines? I have one band and I only want the horizontal grid lines to show.
Normally I would search the forums for an answer but that doesn't seem to be working.
Hello,
You can set the BorderStyleCell to None and this will remove the vertical lines. The following code accomplishes this:
this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = UIElementBorderStyle.None;
Alan
this works fine with vertical lines. But how to hide the horizontal lines?
Thank you very much!
Do the same for BorderStyleRow.
yes that works fine. By the way I need to replace a farpoint gird with an UltraWinGrid.
This farpoint gird has partially (column 1-40) no grid lines for displaying symbols and the rest (column 41-45) we do have grid lines for displaying numbers. Can this behaviour also be done with an UltraWinGrid.
Sutha,
Which picture are you referring to, there wasn't a picture in your post and there are many in this thread from before. Please provide an image that shows that you are looking for or what you want to change.
hi, But i need a border for heading also, how is there in above picture same way with all rows border also.
Plz help me
Regards
Sutha
Hi Fredrik,
You would basically have to duplicate the same code in the RowExported event of the UltraGridDocumentExporter and modify the properties of the report row borders. Something like this:
Private Sub expPdfExporter_RowExported(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.DocumentExport.RowExportedEventArgs) Handles expPdfExporter.RowExported Dim row As UltraGridRow = e.GridRow If lstUnderLine.ContainsKey(row.Index) Or lstOverLine.ContainsKey(row.Index) Then ' This will only be called for the BeforeDrawBorders phase of a ' RowCellAreaUIElement based on the flags returned from GetPhasesToFilter. ' Draw a border along the top edge of the element. e.ReportRow.Borders = New Infragistics.Documents.Report.Borders(Nothing, Nothing, Infragistics.Documents.Graphics.Pens.Black, Nothing) 'if it is the last row draw a line at the bottom If row.HasNextSibling = False Then e.ReportRow.Borders = New Infragistics.Documents.Report.Borders(Nothing, Nothing, Infragistics.Documents.Graphics.Pens.Black, Infragistics.Documents.Graphics.Pens.Black) End If End If End Sub
So is there another way of doing it then? Creating the horizontal lines over and under the text without using the drawfilter? SO that it will apare in the pdf export?
greeting,
fredrik
A DrawFilter will apply when printing the grid, because the grid actually draws itself onto the printer's graphics object.
But this is not the case for exporting. The grid does not draw itself onto any graphics objects in PDF, it creates a PDF structure that matches itself. So the DrawFilter will not apply.
I don't beleive there is any way to do this in the PDF export.