ranjeet narvekar

ranjeet narvekar

  • NA
  • 42
  • 2.3k

movable combobox in datagridview in C# windows application

Oct 13 2014 2:15 AM
i want to use external physical combobox which is filled with dataset .i want this combobox to be available in the grid at particular cell address when i enter into that cell. navigation should be with keyboard.
thanks in advance


i use following code but it does not available in Cell enter & also keyboard navigation are not working.
1-Formload
datagridview1.Controls.Add(conbobox1);
 
2-Cell Begin Edit
private void datagridview1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
if (datagridview1.CurrentCell.ColumnIndex == 16)
{
conbobox1.Visible = true;
conbobox1.Size = datagridview1.CurrentCell.Size;
conbobox1.Location = datagridview1.GetCellDisplayRectangle(e.ColumnIndex, e.RowIndex, true).Location;
}

Answers (1)