locked
Track changes in WinForms to a List<> RRS feed

  • Question

  • I am working on an issue with tracking changes to List<POC> in a winform. I am trying to setup an N-Teir application (DataBase ->EntityModel->DataService->WCFbusiness layer ->WindowsForm). I can get to the WCF service returning a List<type>. The trouble I am having is tracking changes to the List<type> once in the form. does anyone have an example of how to do this within .Net 4.x?

    Thank you

    ~Andy~

    Monday, August 2, 2010 7:27 PM

All replies

  • If you are on .NET 4 then you can make use of ObservableCollection. This allows you to listen to collection changed events and react accordingly.

    regards

    Lohith

    about.me/kashyapa


    regards kashyapa
    Wednesday, August 24, 2011 7:48 PM
  • I'm not sure what you are doing in your "WCFbusiness layer," but if you use the WCF Data Services client library to consume the OData feed from the WCF Data Service, the client can generate a DataServiceCollection<POC> object on the client that represents the feed for binding. DataServiceCollection<T> inherits from ObservableCollection<T> and is used to bind to controls; plus it automatically updates the DataServiceContext that tracks changes on the client. For more information, see Binding Data to Controls (WCF Data Services).

    Cheers,

    Glenn Gailey


    Please visit my blog

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, August 25, 2011 7:22 AM