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
235
how to remove the arrow in row selector?
posted

Dear experts,

I use the following snippet to set the row selector width:

gridBand.Override.RowSelectorWidth = 5;

But if I use default selector width(don't set RowSelectorWidth using above snippet), there will be one arrow always appeared, how to remove the arrow?

Any help will be appreciated,

Alfonzoe

  • 469350
    Offline posted

    Hi Alfonzoe,

    If you don't want any of the symbols to appear in the row selectors, you can acheive this much more easily by setting the RowSelectorAppearance.ImageAlpha to Transparent.

  • 575
    posted

    I believe that you need to implemend a uielementdrawfilter class. It took us a while to get this figured out, but it works really good.

    Create a instance of the class below and assign it to your grids DrawFilter.

     Hope This helps,
    Brandon

     Example of the class:

    Public Class BlankRowSelectorDrawFilter
    Implements Infragistics.Win.IUIElementDrawFilter

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

    ' Drawing RowSelector Call DrawElement Before the Image is Drawn

    If TypeOf drawParams.Element Is Infragistics.Win.UltraWinGrid.RowSelectorUIElement Then
         Return DrawPhase.BeforeDrawImage
    Else
         Return DrawPhase.None
    End If

    End Function

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

    ' If the image isn't drawn yet, and the UIElement is a RowSelector
    If drawPhase = drawPhase.BeforeDrawImage And TypeOf drawParams.Element Is Infragistics.Win.UltraWinGrid.RowSelectorUIElement Then
    ' Get a handle of the row that is being drawn
             Dim row As UltraGridRow = CType(drawParams.Element.GetContext(Type.GetType("UltraGridRow")), UltraGridRow)
    ' It this is a data row, return true to prevent any images from being drawn
        If row.IsDataRow Then
             Return True
         End If
    End If
    ' Else return false, to draw as normal
          Return False
    End Function

    End Class