WinForms DataGridView complex binding
Is this possible to bind on datagrid view?
I have this class Relation, which is objects are populated in dropdown:
And this class Travle which should be DataSource of data grid view:
In picture you will see what I want to bind, so when I select Relation from first coulmn it should show Kilometers and when I enter Count it should create new object in DataSource.
Why this doesn't work when I have
I don't have option to add rows in data grid view?
P.S Application is written in WinForms.
2 Replies
Try to add a call to the data grid refresh after re|setting the data source
Control.Refresh Method (System.Windows.Forms)
Forces the control to invalidate its client area and immediately redraw itself and any child controls.