I'm using a RadGridView which has a view GridViewComboBoxColumn s inside. The editor itself is a custom editor based upon: RadDropDownListEditor.
I'm currently trying to implement it so that pressing left or right arrow does not affect the cell or the select items but instead moves the cursor inside the editor. Thus my question is how can I access the position of the cursor there.
class CustomizedDropDownEditor : RadDropDownListEditor
{
public override void OnKeyDown(System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode == System.Windows.Forms.Keys.Left || e.KeyCode == System.Windows.Forms.Keys.Right)
{
//Customized left right arrow key behaviour
}
else
{
base.OnKeyDown(e);
}
}
I've tried a few things already but didn't come up with a way where I can access the textbox of the editor or the selectionstart in there.
Edit: Despite the above code intercepting the keys the left arrow key still results in a cell leave (the right arrow key does not result in this though). Is there a possibility to avoid this and if so how?
Tnx.