简体   繁体   中英

Editable Combo Box in Datagrid of WPF (C#)

I am developing sale invoice in WPF. Previously, I am using pop up to manage add, edit and delete operation in datagrid but now I want to do all of these operation in DataGrid. Everything is possible except an editable Combo Box. There are following fields in Grid:-

  • Description
  • Qty
  • Rate
  • Unit
  • Total

There should be a editable Combo Box in description filed where from I select an item and rate and unit should be accessed from product table and automatically add in specific cell of grid. Combobox (as type any character in combo box, item should be short list or cursor move to specific record). I am able to add such functionality outside the grid but unable to add in grid.

I think you just need to add this code to your ComboBoxItem

IsEditable="True"

This would make it editable, and GridView has nothing to do with that.

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