Combobox in datagrid, again...

R

Richard Hallgren

Hi,



In Windows Forms the usual approach to add a combobox in a datagrid involves
adding a single combobox to the DataGrid.Controls, and then selectively
displaying it as needed when a combobox cell becomes the currentcell.
However I'm looking for a way to add a control to a cell in each row from
the actually set up and source binding of the datagrid. I'd like to have the
combobox visible at all times (kind of hard to know that one can change the
values otherwise), the mentioned approach hides the only combobox once the
cell loses focus, to have it ready for display on the next cell that get
focus.



Does anyone have an article about something like this or have a few hints on
how this could be achieved?



Richard
 
Z

Zürcher See

If you have implemented your own DataGrid column extending the
TemplateColumn, you can allways paint an inexistent dropdown using the
System.Windows.Forms.ControlPaint.DrawComboButton( .... )

method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top