Results 1 to 9 of 9

Thread: How to update a dataset with a datagrid

  1. #1

    Thread Starter
    Addicted Member Porsche944's Avatar
    Join Date
    Apr 2005
    Location
    Ann Arbor
    Posts
    182

    Question How to update a dataset with a datagrid

    Hey everyone,
    I have been searching google for a few days now trying to fix an example how to do this.

    My program collections information and stores it inside a datagrid. That part works fine. I am having trouble figuring out how to take that datagrid and create a new dataset from it with all the information the datagrid contains. I will then use that dataset with a OLEdBDataAdpater to update a Microsoft Access Database.

    How can I do this? All the code I have found online is for taking a table from a database , storing it in a dataset and then setting the datasource of the datagrid to the dataset.

    I know this is possible and it's probably really easy.

  2. #2

    Thread Starter
    Addicted Member Porsche944's Avatar
    Join Date
    Apr 2005
    Location
    Ann Arbor
    Posts
    182

    Unhappy Re: How to update a dataset with a datagrid

    Anybody? Any Hints? Tips? Jokes or Comments

  3. #3

    Thread Starter
    Addicted Member Porsche944's Avatar
    Join Date
    Apr 2005
    Location
    Ann Arbor
    Posts
    182

    Re: How to update a dataset with a datagrid

    bump

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: How to update a dataset with a datagrid

    You could take that datagrid into a table then take that table storing it in a dataset and then setting the datasource of the datagrid to the dataset....
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5

    Thread Starter
    Addicted Member Porsche944's Avatar
    Join Date
    Apr 2005
    Location
    Ann Arbor
    Posts
    182

    Re: How to update a dataset with a datagrid

    How would I convert a datagrid to a table?

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How to update a dataset with a datagrid

    Can you create a recordset out of your collections information?

    If so, you could easily dump that recordset into a DB table using INSERT INTO.

  7. #7

    Thread Starter
    Addicted Member Porsche944's Avatar
    Join Date
    Apr 2005
    Location
    Ann Arbor
    Posts
    182

    Re: How to update a dataset with a datagrid

    I don't have a collection of information. I just have a datagrid that is filled with information dynamiclly.

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How to update a dataset with a datagrid

    Ok...from what source does the datagrid get populated?

  9. #9

    Thread Starter
    Addicted Member Porsche944's Avatar
    Join Date
    Apr 2005
    Location
    Ann Arbor
    Posts
    182

    Re: How to update a dataset with a datagrid

    A custom collection of custom objects I created =)

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