简体   繁体   中英

Need a C#/WPF Datagrid with combobox column example

I guest similar questions to this one could have been asked, I still need an answer or example. I need to make sure that, the built-in WPF Datagrid, does it support combobox column editing or not? If it does, please provide me a working example. Though I may find several, even a lot, they have some of the following problem:

1.Outdated, cannot compile with the current Visual Studio (2013 or 2015)

2.Not working

3.Needs a 3rd party control, like WPF Toolkit. This is even more confusing. I may find a lot of different versions, and not working as well. Right now I only want to know whether the built in Datagrid may work or not.

4.combobox options not from a Key-Value list (or some other list). I know I need to specify SelectedItemBinding, SelectedValueBinding, SelectedValuePath, isplayMemberPath. It is so confusing. I just can't get it work.

I've tried ObservableCollection. Do not what went wrong. If you have a really work sample, please just reply me with the code. Thanks!

正如@Ed Plunkett在评论中提到的那样,使用这个答案 ,它有一个很棒的Datagrid和combobox列示例

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