c# - Add dropdown for a specific cell in a datagridview -


I am trying to add different controls to cells in the same column. The drop down does not display and there is no visible setter:

  Private Zero AddBooleanDropDown (DataGridView grid, integer line, keyValuePair & lt; string, string & gt; kvp) {DataGridViewComboBoxCell dropDownCell = new DataGridViewComboBoxCell (); DropDownCell.DataSource = New String [] {"True", "False"}; Grid Rows [row]. [["Value"] = dropdown cell; }  

here is very good.

DataGridView provides several column types, allowing your users to enter and edit values ​​in different ways. If these column types do not meet the needs of your data-entry, then you can create your own column type with those cells, which are host controls of your choice. To do this, you have to define the sections to be removed from DataGridViewColumn and DataGridViewCell . You must also define a class that turns out of control and applies the IDataGridViewEditingControl interface.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -