Results 1 to 4 of 4

Thread: New Rows

  1. #1

    Thread Starter
    Addicted Member soluga's Avatar
    Join Date
    Dec 2005
    Location
    Manchester (Uk)
    Posts
    211

    New Rows

    Is it possible to differentiate between new rows and changed rows in a grid?
    I want to be able to create two arrays, one with the changed rows and one with the new rows, so that I can then create an update proc and/or a new proc depending on what has happend in the grid!!

    Grateful for any advice as always.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: New Rows

    What type of grid are we talking about? Is it bound to a DataSource? Is the DataSource a DataTable or something else?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member soluga's Avatar
    Join Date
    Dec 2005
    Location
    Manchester (Uk)
    Posts
    211

    Re: New Rows

    It is a Janus datagrid populated by a dataset

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: New Rows

    Then forget the grid and worry about the DataSource. All DataRows have a RowState property that indicates whether they have been changed or not. You can also call GetChanges on a DataSet or DataTable to get all changed rows or you can specify a RowState and get just new rows, just updated rows, just deleted rows or whatever.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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