Telerik RadComboBox in RadGridView (GridViewComboBoxColumn) 1st click trigger issue while the drop down is in open state.

1 Answer 120 Views
ComboBox GridView
Barani
Top achievements
Rank 1
Iron
Iron
Barani asked on 06 Jul 2022, 03:47 PM

After opening the RadComboBox in RadGridView (GridViewComboBoxColumn), it is displaying values are in the dropdown.
Scenario-1:
Now, if I don't select any value in the dropdown list (while it is in open) and also click the button. In the 1st click, the dropdown is closed and only in the 2nd click 
button will trigger the function.

I've attached my demo project for your reference. Can you please help me to fix the above issue on the 1st click itself? Is there any possible way to do it, if so please guide me.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 11 Jul 2022, 12:14 PM

Hello Barani,

This behavior is expected because the DropDownContent of the RadComboBox control is hosted in a native WPF Popup element, which by design is set to be the topmost element of the application. This is also the case when the WPF ComboBox control is used and its dropdown menu is opened.

However, you could achieve the desired result by writing some custom code. To do so, create a new GridViewDataColumn instead of the GridViewComboBoxColumn one, and define a RadComboBox control for its CellEditTemplate property. After that, subscribe to its DropDownClosed event. This StackOverflow article shows one solution to this unwanted behavior, which will raise a MouseDown event of the control, on which the mouse is currently over.

With this said, could you give this suggestion a try?

Regards,
Stenly
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.

Tags
ComboBox GridView
Asked by
Barani
Top achievements
Rank 1
Iron
Iron
Answers by
Stenly
Telerik team
Share this question
or