Skip to content

Replies

0
Sanjeev
Sanjeev answered on May 19, 2009 12:20 PM

I tried all the possible events but none of them works.

However I found an alternative . I used mouse down event

 

 

 

 

Private Sub SDPUltraGridTypes_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) HandlesSDPUltraGridTypes.MouseDown

 

 

If e.Button = Windows.Forms.MouseButtons.Left Then

Dim objClickedElement As Infragistics.Win.UIElement = Me.SDPUltraGridTypes.DisplayLayout.UIElement.ElementFromPoint(e.Location)

If objClickedElement Is Nothing Then Return

Dim objCellElement As Infragistics.Win.UltraWinGrid.CellUIElement = CType(objClickedElement.GetAncestor(GetType(Infragistics.Win.UltraWinGrid.CellUIElement)), Infragistics.Win.UltraWinGrid.CellUIElement)

If objCellElement Is Nothing Then Return

 Dim objCell As Infragistics.Win.UltraWinGrid.UltraGridCell = CType(objCellElement.GetContext(GetType(Infragistics.Win.UltraWinGrid.UltraGridCell)), Infragistics.Win.UltraWinGrid.UltraGridCell)

 

 

If objCell.Column.Key = "Set" Then

objCell.Row.Selected = True

objCell.Row.Activate()

 

 

If objCell.Value.Equals(True) Then

objCell.Value =

False

 

 

Else

objCell.Value =

True

 End If

EndIf

 

End If

 

 End Sub

 

And Now Its working fine now,

Thanks