So I'm (relatively) new to Linq and WPF (we are a .NET shop at work but no plans to start utilizing these technologies on a large scale in the near future) so I decided to write a little widget using them.
Everything is going alright for me except for one aspect: databinding a listview so that when I update a value in the database backend, it propagates back to the listview.
Some background:
*Using Linq to Entities 4.0(Relevant database tables mapped using *.edmx file)
*"Binding" the listview to entries in a database table:
*When listview entries are highlighted and a button is clicked, a column in the table is updated, but my list view doesn't get that update.
**EDIT: The column that gets updated is a foreign key on the table (a status value). Basically, I am wanting to reset tasks that are in error to try again.
I've set the DataBinding for listViewTasks to OneWay in the XAML.
What am I doing wrong/missing? What my issue really boils down to is how do I bind to a collection of items in XAML when I don't know what that collection will contain at compile-time?
Thanks for tolerating such remedial WPF questions.
Everything is going alright for me except for one aspect: databinding a listview so that when I update a value in the database backend, it propagates back to the listview.
Some background:
*Using Linq to Entities 4.0(Relevant database tables mapped using *.edmx file)
*"Binding" the listview to entries in a database table:
Code:
listViewTasks.ItemsSource = tasks;//tasks is a generic list of Database table entries
*When listview entries are highlighted and a button is clicked, a column in the table is updated, but my list view doesn't get that update.
**EDIT: The column that gets updated is a foreign key on the table (a status value). Basically, I am wanting to reset tasks that are in error to try again.
I've set the DataBinding for listViewTasks to OneWay in the XAML.
What am I doing wrong/missing? What my issue really boils down to is how do I bind to a collection of items in XAML when I don't know what that collection will contain at compile-time?
Thanks for tolerating such remedial WPF questions.