table look in datagrid column

  • Thread starter Thread starter Andrea Sansottera
  • Start date Start date
A

Andrea Sansottera

Hi all,

I've a a child table in a DataGrid (System.Windows.Forms).
I'd like to make the cells of the foreign key column to show the user
which values he can enter in that field (those contained in the parent
table).

I've read the following paragraph in the framework documentation:

ms-help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cptskCreatingLookupTableForListBoxOrComboBoxControl.htm

But it refers only to ListBox or ComboBox.

I'm quite new to Windows Forms, so probably I'm asking something very
obvious...

Any suggestion is appreciated...

Andrea
 
Ciao!

You will need a custom DataGridColumnStyle to display drop-down box for
picking the new cell value from the list.
Please refer to MSDN docs on System.Windows.Forms.DataGridColumnStyle class
overview, there should be an example of creating a custom column style.
 
Dmitriy said:
Ciao!

You will need a custom DataGridColumnStyle to display drop-down box for
picking the new cell value from the list.
Please refer to MSDN docs on System.Windows.Forms.DataGridColumnStyle
class overview, there should be an example of creating a custom column
style.

Thank you, great suggestion Dmitriy!
 
Back
Top