c# - DataGridView listing selected item from ListBox -
There is a list list from the database on my form1 (bindsourceed).
On my form, I have kept a datagrid view and would like to show data from the list selected on the Form 1.
Binding source binding source 1 = new binding resource (); BindingSource1.DataSource = s to db.Filmek where s.Filmcim == (string) select f.lBfilmlista.SelectedValue s; DataGridView1.DataSource = Binding Source 1; The problem above my code is that it lists my first movie for the first time, whether I select another film or not from the list box on my form 1. How should I always show selected items from the catalog?
index change event list of selected list list ...... < P> The reason for this data source will be called for only one time (in the beginning)
If you use the selected index change event list box every time the data source will bind and you will receive whatever you want ....
All the best
Comments
Post a Comment