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
310
Merge Header Column or Hide Partial Borders
posted

Hi,

 I am using an Infragistics WinGrid and I need to either 1) Merge the column headers for the left 3 columns, or 2) Simply hide the inner borders for those columns.  I do not need any header caption in any of the three columns.  Here is how it appears:

            Irrelevant column Irrelevant column 2
data data data data data
data data data data data
data data data data data

 

What I want is this:

            Irrelevant column Irrelevant column 2
data data data data data
data data data data data
data data data data data

Unfortunately this grid also uses a pre-defined company specific layout which includes a DrawFilter which I'll include below.  I suspect that I can modify the DrawFilter to do this but not really sure how:

 

Public Class NoRowBorders_DrawFilter : Implements Infragistics.Win.IUIElementDrawFilter

Public Function DrawElement(ByVal drawPhase As Infragistics.Win.DrawPhase, ByRef drawParams As Infragistics.Win.UIElementDrawParams) As Boolean Implements Infragistics.Win.IUIElementDrawFilter.DrawElement

Select Case drawPhase

  Case drawPhase.BeforeDrawBorders

Return True

Case drawPhase.AfterDrawElement  Dim aCellUIElement As Infragistics.Win.UltraWinGrid.CellUIElement = CType(drawParams.Element, Infragistics.Win.UltraWinGrid.CellUIElement)

drawParams.DrawBorders(Infragistics.Win.UIElementBorderStyle.Solid, Border3DSide.Right, Rectangle.Inflate(aCellUIElement.Rect, 0, 1))

Return True

End Select

End Function

Public Function GetPhasesToFilter(ByRef drawParams As Infragistics.Win.UIElementDrawParams) As Infragistics.Win.DrawPhase Implements Infragistics.Win.IUIElementDrawFilter.GetPhasesToFilter

If TypeOf drawParams.Element Is Infragistics.Win.UltraWinGrid.CellUIElement Then

  Return Infragistics.Win.DrawPhase.AfterDrawElement Or Infragistics.Win.DrawPhase.BeforeDrawBorders

End If

End Function

End Class

 

Parents
  • 310
    posted

    Unfortunately the post doesn't show table borders that were overwritten by site's settings, but the first table is supposed to show the left 3 columns with a full outline border, and the 2nd table just an outline border of the left 3 and no inner borders.

Reply Children