Hi
I have column GridViewTextBoxColumn.
For some rows I use RadDropDownListEditor in this column. I have random issue that sometimes drop down list cannot be collapsed by mouse click I have to press enter to collapse drop down list. It works fine in Q2 SP2.
Very bad surprise...
Is there any workaround for this issue in Q3?
Regards
7 Answers, 1 is accepted

Can you please post some code so that it would be easier to replicate and find a solution for this problem.
Best Regards,
Emanuel Varga
Telerik WinForms MVP

I prepared demo for you but in my demo it works fine J
I have problem only in my real form – in commercial product. It means that I must have some code that affects somehow drop down list editor in Q3 and doesn`t affect drop down editor in Q2 SP2. I cannot localize this code.
It was very weird because I changed only dll files to Q3 and after this change I started having this problem.
Fortunately I found workaround, I did this:
private
void
radGridView1_CellEditorInitialized(
object
sender, GridViewCellEventArgs e)
{
RadDropDownListEditor editor = (e.ActiveEditor
as
RadDropDownListEditor);
if
(editor !=
null
)
{
RadDropDownListEditorElement editorElement = editor.EditorElement
as
RadDropDownListEditorElement;
editorElement.Popup.MouseClick +=
new
MouseEventHandler(Popup_MouseClick);
}
}
void
Popup_MouseClick(
object
sender, MouseEventArgs e)
{
RadDropDownListEditor editor = radGridView1.ActiveEditor
as
RadDropDownListEditor;
if
(editor !=
null
)
{
RadDropDownListEditorElement editorElement = editor.EditorElement
as
RadDropDownListEditorElement;
editorElement.ClosePopup();
}
}
If you see similar problem and find solution please let me know, maybe I will be able to get rid of this workaround and use standard procedure.
Regards

I did not experience this problem yet, but until i do, you can use this, it's easier to remove later:
private
void
radGridView1_CellEditorInitialized(
object
sender, GridViewCellEventArgs e)
{
RadDropDownListEditor editor = (e.ActiveEditor
as
RadDropDownListEditor);
if
(editor !=
null
)
{
RadDropDownListEditorElement editorElement = editor.EditorElement
as
RadDropDownListEditorElement;
editorElement.Popup.MouseClick +=
delegate
{
if
(!editorElement.IsPopupOpen)
{
return
;
}
editorElement.ClosePopup();
};
}
}
Hope this helps, if you have any other questions or comments, please let me know,
Best Regards,
Emanuel Varga
Telerik WinForms MVP

Dim editor As RadDropDownListEditor = TryCast(e.ActiveEditor, RadDropDownListEditor)
If editor IsNot Nothing Then
Dim editorElement As RadDropDownListEditorElement = TryCast(editor.EditorElement, RadDropDownListEditorElement)
AddHandler editorElement.Popup.MouseClick, Sub(s, ev)
If editorElement.IsPopupOpen Then
editorElement.ClosePopup()
End If
End Sub
End If
This seems to take care of the problem ... but I am not marking this as the answer because I am hoping that Telerik will actually fix the problem so this won't be necessary.

I'm glad this solved your problem and you couldn't mark this as an answer in this thread even if you wanted to :P.
Have a great weekend,
Best Regards,
Emanuel Varga
Telerik WinForms MVP

Thank you for writing.
The purpose of this work around is to close the popup when it is being clicked - no matter where the scroll bar or somewhere else. As far as I understand when you click the scroll bar, your drop down is being closed. If you are using the code provided in this thread, this is the expected behavior. Otherwise, in order to avoid discussing different subjects in the same thread please open a new forum thread or support ticket (where you will get faster answer - according to your license - and you are able to attach sample projects) where you explain in details the experienced and the expected behavior.
We are looking forward to helping you.
Kind regards,
Stefan
the Telerik team