I have a gridview ( Winforms Q2 2008) binded to a datasource. I want to get the edited value in a cell (Decimal Datatype)
The CellClick event is not getting fired and the code in it is not being executed. The ActiveEditor.value is NOTHING ...
I need to get the value in that cell...Please help
Below is the code for reference
Private Sub rdgvItemPricing_CellClick(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs)
If e.ColumnIndex = 12 Then
m_blnPriceRowClicked = True
Else
m_blnPriceRowClicked = False
End If
End Sub
--
Private Sub rdgvItemPricing_Validated(ByVal sender As Object, ByVal e As System.EventArgs)
Dim stcItemPricing As New stc_Item_ItemPricing
If m_blnPriceRowClicked Then
m_blnPriceRowClicked = False
If Not fnGetStructure(stcItemPricing) Then Exit Sub
If m_objMenuItems.AddUpdateItemPricing(stcItemPricing) Then
MessageBox.Show("Item price updated successfully", g_strCaption, MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("Error updating the Item Price", g_strCaption, MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End If
End Sub
Private Function fnGetStructure(ByRef stcItemPricing As stc_Item_ItemPricing) As Boolean
With stcItemPricing
'UI.RadGridView.EditingElement
.intMenuItemCode = CInt(rdgvItemPricing.CurrentRow.Cells(1).Value)
.intDeptCode = CInt(rdgvItemPricing.CurrentRow.Cells(14).Value)
.intUserCode = CInt(g_intUserCode)
If IsNothing(rdgvItemPricing.ActiveEditor.Value) Then
Return False
End If
.dblPrice = CDbl(rdgvItemPricing.ActiveEditor.Value) 'CDbl(rdgvItemPricing.CurrentRow.Cells(12).Value)
............................
............................
The CellClick event is not getting fired and the code in it is not being executed. The ActiveEditor.value is NOTHING ...
I need to get the value in that cell...Please help
Below is the code for reference
Private Sub rdgvItemPricing_CellClick(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs)
If e.ColumnIndex = 12 Then
m_blnPriceRowClicked = True
Else
m_blnPriceRowClicked = False
End If
End Sub
--
Private Sub rdgvItemPricing_Validated(ByVal sender As Object, ByVal e As System.EventArgs)
Dim stcItemPricing As New stc_Item_ItemPricing
If m_blnPriceRowClicked Then
m_blnPriceRowClicked = False
If Not fnGetStructure(stcItemPricing) Then Exit Sub
If m_objMenuItems.AddUpdateItemPricing(stcItemPricing) Then
MessageBox.Show("Item price updated successfully", g_strCaption, MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("Error updating the Item Price", g_strCaption, MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End If
End Sub
Private Function fnGetStructure(ByRef stcItemPricing As stc_Item_ItemPricing) As Boolean
With stcItemPricing
'UI.RadGridView.EditingElement
.intMenuItemCode = CInt(rdgvItemPricing.CurrentRow.Cells(1).Value)
.intDeptCode = CInt(rdgvItemPricing.CurrentRow.Cells(14).Value)
.intUserCode = CInt(g_intUserCode)
If IsNothing(rdgvItemPricing.ActiveEditor.Value) Then
Return False
End If
.dblPrice = CDbl(rdgvItemPricing.ActiveEditor.Value) 'CDbl(rdgvItemPricing.CurrentRow.Cells(12).Value)
............................
............................