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,
If you want it off all the time them use this draw filter.
Imports
Infragistics.Win
Infragistics.Win.UltraWinGrid
Public
clsRemovePencil
IUIElementDrawFilter
_
Infragistics.Win.UIElementDrawParams)
Infragistics.Win.DrawPhase _
Infragistics.Win.IUIElementDrawFilter.GetPhasesToFilter
' Drawing RowSelector Call DrawElement Before the Image is Drawn
Infragistics.Win.UltraWinGrid.RowSelectorUIElement
Then
DrawPhase.BeforeDrawImage
Else
DrawPhase.None
If
Function
Infragistics.Win.DrawPhase,
Infragistics.Win.IUIElementDrawFilter.DrawElement
' If the image isn't drawn yet, and the UIElement is a RowSelector
drawParams.Element
' Get a handle of the row that is being drawn
UltraGridRow = _
)), _
UltraGridRow)
'Debug.Print(row.Cells("txtVendorName").Value)
' If the row being draw is the active row
' Draw an arrow
drawParams.DrawArrowIndicator(ScrollButton.Right, _
drawParams.Element.Rect, _
UIElementButtonState.Indeterminate)
' Return true, to stop any other image from being drawn
True
' Else return false, to draw as normal or true to stop pencil
'Return False
End
Class
Hi Subbu,
My guess is that the UpdateData call cannot be honored while the cell is in the process of entering edit mode. If that's the case, then you might be able to work around it by calling this method using a BeginInvoke, rather than directly inside the event.
If that does not work, then I don't see any way to do this just for this one situation. In other words, I don't see a way to turn off the pencil only when a cell enters edit mode. You can turn off the images in the RowSelectors entirely by setting RowSelectorAppearance.ImageAlpha to Transparent, of course.