Multi-column bound combo box in DataGridView

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hi,

Is there a way that a multi-column bound combo box can be displayed inside a DataGridView control with column headers inside the drop list section of the combo box?

A use case could be something like an order form with orderlines where the user clicks on the drop down combo in a product code column and a gridview displays showing the productID, product code, product description and stock level allowing the user to select the product which then fills the orderline grid.

  • You must to post comments
0
0

Sure you can. But it’s a custom cell editor. You can use a UserComboBox, place a DataGridView (or a panel with multiple controls) in the DropDownControl, then assign an instance of your editor control to column1.Editor. Wisej will use the editor when entering edit mode. You can update the data binding by handling the DGV CellBeginEdit event.

Or the editor control can implement the IDataGridViewEditingControl interface and receive all the notifications like the built-in editors.

There are some samples in the forum. I can see if I can put together a simple example specific to this.

/Luca

  • Andrew Hills
    Thanks Luca. I’ll have a search around and see if I can find the examples. If you do have any other material relating to this then that would be handy too.
  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 1, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json