C# datagridview from linq -


I am trying to create a data grid view in a new form and to create a list of only the movie in datagridview which is selected in form1 bindingsourced Has been in the list box. Public Partial Class Modasset: Form {Db1Entities db; Public Meridoset (DB1 Entity DB) {Initialization (); This.db = db; Var q = (from db.movies s to s.Movietitle == (string) select lBfilmlista.SelectedValue). first (); dataGridView1.DataSource = q;

The listbox is public and I still get an error: is not present in the current context. Where: deletegate does not take system.func ...... 1 argument

  string Local = lBfilmlista.SelectedValue; Var q = (from db.movies s where s.movietitle == local selection s). first ();   

I hope this will work

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -