>Thank you.
>It works.You're welcome. =0)
>I found also that up and down arrow keys does not move to previous and next row if combobox in grid is active.
>How to force up/down arrows to move between rows ?First of all, you'd have to have your own DataGridView class. Then, override the ProcessCmdKey method and handle the Up/Down arrows that way.
public class BBGridView : System.Windows.Forms.DataGridView
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
const int WM_KEYDOWN = 0x100;
const int WM_SYSKEYDOWN = 0x104;
if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN))
{
switch (keyData)
{
case Keys.Down:
if (this.CurrentCell is DataGridViewComboBoxCell)
{
this.CurrentCell = this.Rows[this.CurrentCell.RowIndex + 1].Cells[this.CurrentCell.ColumnIndex];
return true;
}
break;
case Keys.Up:
if (this.CurrentCell is DataGridViewComboBoxCell)
{
this.CurrentCell = this.Rows[this.CurrentCell.RowIndex - 1].Cells[this.CurrentCell.ColumnIndex];
return true;
}
break;
}
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
~~Bonnie
>
>>Set the DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
>>
>>~~Bonnie
>>
>>
>>
>>>I use DataGridView containing DataGridViewComboBoxColumn column.
>>>Combobox column displays dropdown list opening selection triangle in all rows. This covers part of visible data if columns are narrow.
>>>
>>>How to force dropdown list opening control to appear only in active (current) row ?