Radgridview Events Problem.!

3 Answers 31 Views
GridView
Abbas
Top achievements
Rank 1
Iron
Abbas asked on 18 Aug 2025, 07:02 AM

Hi there,


I have written a component that resides within a column of a RadGridView. Based on the provided source code, I need the cell events like CellBeginEdit, CellEndEdit, and CellValueChanged in the RadGridView to be handled intelligently and reliably for columns of the AdvancedRadMultiColumnComboPlus type.

In other words, how can I get events like CellBeginEdit, CellEndEdit, and CellValueChanged to fire for columns of the AdvancedRadMultiColumnComboPlus type?

Please guide me.

Thank you.

3 Answers, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 18 Aug 2025, 09:39 AM

Hello, Abbas,

Thank you for the provided files. According to them, I can see that you have implemented a custom AdvancedComboGridCellElement as well as a custom AdvancedComboGridViewColumn, but it is not clear what exactly represents AdvancedRadMultiColumnComboPlus class. My assumptions is that it contains a RadMultiColumnComboBox component which you wrapped in a RadHostItem, and later used to add it to the grid's columns. Please correct me if I am wrong. 

If I am right and your custom AdvancedRadMultiColumnComboPlus internally hosts RadMultiColumnComboBox, you can access the grid inside by using the EditorControl property of RadMultiColumnComboBox. Once you get the RadGridView hosted in the RadMultiColumnComboBox, you can subscribe to CellBeginEdit, CellEndEdit, and CellValueChanged events.  It would be useful if you could also share the implementation of AdvancedRadMultiColumnComboPlus. 

I assume that this custom approach was suggested in an earlier version of the Telerik UI for WinForms suite. Can you specify which version of Telerik UI for WinForms you use on your side?

GridViewMultiComboBoxColumn

I would like to inform you that with the latest versions of our suite, RadGridView offers GridViewMultiComboBoxColumn. This column has RadMultiColumnComboBoxElement as an editor. It covers the features that the RadMultiColumnComboBox control has. Using this column, you can represent data in a drop-down using RadMultiColumnComboBoxElement when the cell is in edit mode. You should be able to subscribe to CellBeginEdit, CellEndEdit, and CellValueChanged events that you need.

More information is available here: GridViewMultiComboBoxColumn

Can you give the GridViewMultiComboBoxColumn a try and let me know if this is the functionality that you obtain using the custom approach? 

I am looking forward to your reply.

Regards,
Nadya | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Abbas
Top achievements
Rank 1
Iron
commented on 18 Aug 2025, 11:28 AM

Hello Nayda,

I truly appreciate your guidance and detailed explanations. Yes, I will send you the source code for the AdvancedRadMultiColumnComboPlus component to enable a more thorough review.

I look forward to your valuable feedback and suggestions once you’ve examined the code.

Best regards,
Abbas

0
Abbas
Top achievements
Rank 1
Iron
answered on 21 Aug 2025, 06:27 AM
UP.
Nadya | Tech Support Engineer
Telerik team
commented on 21 Aug 2025, 08:55 AM

Hello, Abbas,

Thank you for providing the custom implementation for the AdvancedRadMultiColumnComboPlus. Indeed, my assumption was correct, and it represents a user control with RadMultiColumnComboBox inside. 

You can access the grid control inside your _comboBox (RadMultiColumnComboBox) by using the EditorControl property. Once you get the RadGridView hosted in the RadMultiColumnComboBox, you can subscribe to CellBeginEdit, CellEndEdit, and CellValueChanged events.

If you check my previous reply carefully, you can find further details. Can you specify which version of Telerik UI for WinForms you use on your side?

Regards,
Nadya

 

0
Abbas
Top achievements
Rank 1
Iron
answered on 22 Aug 2025, 09:23 AM

Hello Nadya,

Thank you for your response and for confirming the approach. I'm currently using Telerik UI for WinForms version 2024_4_1113.

Based on your guidance, I understand that I can access the underlying RadGridView through the EditorControl property of the RadMultiColumnComboBox.

I need you to provide me with a concrete and practical example.
It would be even better if you could use the codes I sent you. 

Thanks.

Nadya | Tech Support Engineer
Telerik team
commented on 26 Aug 2025, 08:40 AM

Hello, Abbas,

In your AdvancedRadMultiColumnComboPlus, you have WireEvents(). You can subscribe there to the events that you need by access the grid through the EditorControl property. 

Here is an example:

private void WireEvents()
 {
     try
     {
         if (_comboBox != null)
         {
             _comboBox.DropDownOpened += OnDropDownOpened;
             _comboBox.DropDownClosed += OnDropDownClosed;

             if (_comboBox.EditorControl != null)
             {
                 _comboBox.EditorControl.CellBeginEdit += EditorControl_CellBeginEdit;
                 _comboBox.EditorControl.CellEndEdit += EditorControl_CellEndEdit;
                 _comboBox.EditorControl.CellValueChanged += EditorControl_CellValueChanged;
             }
         }
     }
     catch (Exception ex)
     {
         System.Diagnostics.Debug.WriteLine($"WireEvents failed: {ex.Message}");
     }
 }

 private void EditorControl_CellValueChanged(object sender, GridViewCellEventArgs e)
 {
  // TO DO
 }

 private void EditorControl_CellEndEdit(object sender, GridViewCellEventArgs e)
 {
  //TO DO
 }

 private void EditorControl_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
 {
   // TO DO
 }
 #endregion

 

Feel free to achieve desired functionality according to your needs.

Regards,
Nadya

Tags
GridView
Asked by
Abbas
Top achievements
Rank 1
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
Abbas
Top achievements
Rank 1
Iron
Share this question
or