Apr
24
Written by:
Steve Gray
4/24/2010 5:44 PM
Here’s a code sample for the Janus Grid CellUpdated event
Code Snippet
- Private Sub GridEX1_CellUpdated(ByVal sender As Object, ByVal e As Janus.Windows.GridEX.ColumnActionEventArgs) Handles GridEX1.CellUpdated
- Dim dblMasterQuantity As String = Me.GridEX1.GetValue("masterquantity")
- Dim dblQtyBaseUofM As String = Me.GridEX1.GetValue("qtybsuom")
- If dblQtyBaseUofM = 1 Then
- Exit Sub
- End If
-
- If dblMasterQuantity / dblQtyBaseUofM <> 0 Then
- Dim dblMod = dblMasterQuantity Mod dblQtyBaseUofM
- Dim dblNewQty As Double = dblMasterQuantity - dblMod + dblQtyBaseUofM
- Me.GridEX1.SetValue("masterQuantity", dblNewQty)
- End If
-
- End Sub
As always, I welcome your comments!