0
我想使用充滿數據集的外部物理組合框。當我進入該單元格時,我希望該組合框在特定單元格地址的網格中可用。導航應該用鍵盤。在此先感謝datagridview中的可移動組合框
我使用以下代碼,但它不可用在單元格中輸入&也鍵盤導航無法正常工作。 1- Formload datagridview1.Controls.Add(conbobox1);
2節開始編輯
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;
}
}
是使用我寫的代碼的任何可能的解決方案。 – Ranjeet 2014-10-15 07:34:00
你不能把'System.Windows.Form.ComboBox'放在'Datagridview'中 – 2014-10-15 08:04:27
我想讓DataGridViewComboBoxColumn像DropDown一樣工作,不像DropDownlist。 – Ranjeet 2014-10-15 13:04:22