Hi,
I'm using Telerik.WinControls.GridView version 2012.1.321.20.
I have a GridView with a GridViewComboBoxColumn, and the problem I have is that when the box is open and I click on the scroll square- than it's like the focus is out and the comboBox is closed (it's like freezing for 2 seconds and than closing...).
Also, I'm using the next definitions, as you recommended before:
What should I do in order to not loose the focus when click on scrolling? I need the user to scroll up/doun and choose another option from the list.
I'm attaching an image of my comboBox.
Thanks,
Hila.
I'm using Telerik.WinControls.GridView version 2012.1.321.20.
I have a GridView with a GridViewComboBoxColumn, and the problem I have is that when the box is open and I click on the scroll square- than it's like the focus is out and the comboBox is closed (it's like freezing for 2 seconds and than closing...).
Also, I'm using the next definitions, as you recommended before:
public class CustomDropDownListEditor : RadDropDownListEditor
{
protected override RadElement CreateEditorElement()
{
return new CustomDropDownListEditorElement();
}
}
public class CustomDropDownListEditorElement : RadDropDownListEditorElement
{
protected override RadPopupControlBase CreatePopupForm()
{
this.Popup = new CustomDropDownPopupForm(this);
this.Popup.VerticalAlignmentCorrectionMode = AlignmentCorrectionMode.SnapToOuterEdges;
this.Popup.SizingMode = this.DropDownSizingMode;
this.Popup.Height = this.DropDownHeight;
this.Popup.HorizontalAlignmentCorrectionMode = AlignmentCorrectionMode.Smooth;
this.Popup.RightToLeft = this.RightToLeft ? System.Windows.Forms.RightToLeft.Yes : System.Windows.Forms.RightToLeft.Inherit;
this.WirePopupFormEvents(this.Popup);
return Popup;
}
}
public class CustomDropDownPopupForm : DropDownPopupForm
{
public CustomDropDownPopupForm(RadDropDownListElement owner): base(owner) {}
public override string ThemeClassName
{
get { return typeof(DropDownPopupForm).FullName; }
set {}
}
public override void ClosePopup(PopupCloseInfo info)
{
base.ClosePopup(info);
if (info.CloseReason == RadPopupCloseReason.Keyboard)
{
((RadGridView)this.OwnerElement.ElementTree.Control).EndEdit();
}
}
protected override void OnMouseUp(MouseEventArgs e)
{
base.OnMouseUp(e);
((RadGridView)this.OwnerElement.ElementTree.Control).EndEdit();
}
}
You should handle the EditorRequired event to replace the editor:
void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
{
if (e.EditorType == typeof(RadDropDownListEditor))
{
e.EditorType = typeof(CustomDropDownListEditor);
}
}
What should I do in order to not loose the focus when click on scrolling? I need the user to scroll up/doun and choose another option from the list.
I'm attaching an image of my comboBox.
Thanks,
Hila.