Results 1 to 4 of 4

Thread: how to save DATAGRID cells ?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2004
    Posts
    252

    how to save DATAGRID cells ?

    Hi all gurus,
    I am back to my rescue team.

    My application gets data in datagrid from datatable.

    I am getting confused how I can update, insert , delete data [datagrid rows] in datatable.

    can you please show me whit example !

    Thank you,

    -Nanc

  2. #2
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416
    to update a datatable use a sqlcommandbuilder.
    VB Code:
    1. 'da is an adapter
    2. 'dt is a datatable
    3. dt.getchanges()
    4. dim cb as new sqlcommandbuilder(da)
    5. da.update(dt)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2004
    Posts
    252
    Thank you for your kind reply,

    I tried as per you suggested, but it dosent change the data.

    When I load data in datagrid from [let's say] table1, and edit the data in datagrid cells. When I click the Save button, it dosent give error. but data is not saved.

    What could be the problem ?


    Your help is sooooooooooo valuable, than you once again,

    -Nanc

  4. #4
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416
    would you show us your code...in which it does not update the data?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width