This is a migrated thread and some comments may be shown as answers.

Cell CLick not firing

1 Answer 181 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Feroz
Top achievements
Rank 1
Feroz asked on 11 Mar 2009, 01:23 PM
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)
............................
............................

         

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 12 Mar 2009, 07:27 PM
Hello Feroz,

Thank you for contacting us.

The CellClick event is fired only when RadGridView is not in editing mode (e.g ActiveEditor is nothing). You should handle the CellBeginEdit event. This event is fired when the grid enters editing mode.

The ActiveEditor should contain the currently active editor when processing the Validated event. If this is not true, please send us the source code for your application and we will investigate the issue.

I noticed that you are using an old version of RadControls for WinForms. I strongly recommend you to try out newest release - Q1 2009.

Don't hesitate to write us if you have any other questions.

Greetings,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Feroz
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or