locked
Custom filtering of data but while uploading from Client to Server... RRS feed

  • Question

  • Hi there,

    I am making one application using sync framework. everything works perfectly, but i have a requirement where I only have to upload only few of the added rows in client to the server. Currently all of the changed rows in client is synced/uploaded to the server.
    Now my question is, Is it possible to apply custom filtering to the uploaded client data to server? I know its possible to use filtering while downloading from server to client and I am using it, but is just the reverse option available in sync framework.
    If there is then, it will help me a lot.

    Regards.
    Wednesday, January 20, 2010 8:54 PM

Answers

  • Well there is a work around to get this done but you should use it at your best knowledge.

    During upload stage, local changes are enumerated.  Please have a event handler to listen to the client provider event ChangesSelected. 

    In the event handler, please get access to the local data change from e.Context.DataSet.Tables which e is ChangesSelectedEventArgs, a event handler parameter.

    Once you have the datatables, you can modify it before the upload process.

    Thanks.

    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, January 29, 2010 2:16 AM
    Answerer

All replies

  • Would you mind elaborating more details about this needs - why this is interesting to you?

    Thanks.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, January 22, 2010 1:34 AM
    Answerer
  • Well there is a work around to get this done but you should use it at your best knowledge.

    During upload stage, local changes are enumerated.  Please have a event handler to listen to the client provider event ChangesSelected. 

    In the event handler, please get access to the local data change from e.Context.DataSet.Tables which e is ChangesSelectedEventArgs, a event handler parameter.

    Once you have the datatables, you can modify it before the upload process.

    Thanks.

    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, January 29, 2010 2:16 AM
    Answerer