datset

Hi,
I receive a dataset from webservice which I then use to populate a datagrid on windows form.
The user can then make changes in the datagrid on the windows form (i.e. add, delete or update a record).
Can I then have a button which basically takes the data in the grid (i.e the datset) with the changes and pass it back to the webservice
Would you say that I am on the right track if I use dataset.HasChanges ...
Thanks


Answer this question

datset

  • dsutherland

    You could put the datatable in a dataset, this way it is easy to send it back to the dal-webservice
    If you only use a datatable you have to send it record by record (i think) not recomended.
    when using a datatable you can use a dataview to get the changes (rowstatefilter)

    Remco

  • e_LA

    thanks
  • NitinDhall

    Hello again,
    What about if the grid is populated using a datatable instead
    Thanks

  • kishan_99

     fmardani wrote:
    Hi,
    Can I then have a button which basically takes the data in the grid (i.e the datset) with the changes and pass it back to the webservice


    if mydataset.haschanges = true then
       dim dsChanges as dataset = mydataset.changes
    endif

    Send DsChanges back to the webservice

     fmardani wrote:

    Would you say that I am on the right track if I use dataset.HasChanges ...
    Thanks
    Yes you are

    Remco

  • datset