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 do I take off pencil icon from the grid rows.
posted

Hi,

How can i remove pencil icon form the grid rows on cell vaclue change.

i have some  requiremnet to change the grid cell value on enter mode. when i done this i am gettting the pencil symbol on the grid row staring. how can i revome this.

  Private Sub grdSample_AfterEnterEditMode(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdDailyPricesFactors.AfterEnterEditMode

       

        DirectCast(DirectCast(grdSample.ActiveCell, Infragistics.Win.UltraWinGrid.UltraGridCell).EditorResolved, Infragistics.Win.EmbeddableEditorBase).Value = grdSample.ActiveCell.OriginalValue

      grdSample.UpdateData()

                    End Sub

 

 Even after giving the  grdSample.UpdateData() still i am getting the pencil symbol .  Please help me .

Thanks

Subbu.

 

 

Thanks,

Subbu.

Parents
No Data
Reply
  • 918
    Suggested Answer
    posted

    If you want it off all the time them use this draw filter.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Imports

     

     

    Infragistics.Win

    Imports

     

     

    Infragistics.Win.UltraWinGrid

    Public

     

     

    Class

    clsRemovePencil

     

     

    Implements

    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)

     

     

    'Debug.Print(row.Cells("txtVendorName").Value)

     

     

    ' If the row being draw is the active row

     

     

    If row.IsActiveRow

    Then

     

     

    ' Draw an arrow

    drawParams.DrawArrowIndicator(ScrollButton.Right, _

    drawParams.Element.Rect, _

    UIElementButtonState.Indeterminate)

     

     

    ' Return true, to stop any other image from being drawn

     

     

    Return

    True

     

     

    End

    If

     

     

    End

    If

     

     

    ' Else return false, to draw as normal or true to stop pencil

     

     

    'Return False

     

     

    Return

    True

     

     

    End

    Function

     

    End

     

     

    Class

Children
No Data