简体   繁体   中英

Different Combobox values in different rows of DataGridView

I have DataGridView, in which, I would like to have two columns.

  1. 1st column to show object name
  2. 2nd column to show object value in combobox
  3. In first row, I want to display information about "Birds" ie first column will have text as "Birds" and second column will contain a combobox having the names of birds.
  4. In second row, I want to display information about "Animals" ie first column will have text as "Animals" and second column will contain a combobox having the names of animals.

Please let me know how can I achieve this in C#.

Thanks.

添加列组合框类型

you can add column in data grid viewer and set its type Combo box.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM