I have an silverlight5 application,it uses msaccess2010 as database.I have created a datagrid with empty rows in order to enter the values by users.I need to get values of all the rows filled by users in order to pass this values to database using WCF service.Can anyone help me to do it?
I have an silverlight5 application,it uses msaccess2010 as database.I have created a datagrid with
Share
You can bind any IEnumerable to gridview.
You can use your contract class in WCF as item type and you can create an ObservableCollection by using that type.
Lets say your type is
Book.You can create your list like;
Then you can set your gridView’s itemsSource property to that list reference.
After that, grid will reflect all the changes (add, remove, value changes etc.) made from it to this source list.
NOT: Your model contract class your implement INotifyPropertyChanged interface to catch the value updates of each property.
http://jesseliberty.com/2012/06/28/c-5making-inotifypropertychanged-easier/
And you can always get most recent values from the same list reference at any time and your can send this to your WCF to save etc. operations.
This is the power of SL notification system (INotifyPropertyChanged and INotifyCollectionChanged interfaces).