Results 1 to 1 of 1

Thread: datatable contains same rows?

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    datatable contains same rows?

    this is tricky so I apologise.

    Basically we have a gridview. We can delete an item in that gridview and it will mark the row for deleting.

    Now the thing is, next time round we add a "criteria"/row into that gridview and set its values etc.... and hit "run", it will build up the SQL String to run.


    now it does a foreach loop into that datatable and it shows that one of the rows has been marked for deletion (which is true and yes it appears to be deleting the correct row when we hit delete)

    and i find that it is showing duplicate rows instead of what is actually shown in the gridview or equivilent to it

    any ideas? It's hard to explain especially after the state I am trying to debug this! who ever developed this before didnt do a good job.


    the datatable shows there are 3 rows, thats correct since we had 3 and removed 1.

    it then checks to see if the current row is marked for deletion and if not then continue on building the SQL query. But it seems like one of the rows (or perhaps all of them) are duplicating! So instead of "field 1, field 2"....its just "field 1, field 1" showing on each row

    any ideas or tips?
    Last edited by Techno; May 25th, 2007 at 04:41 AM.

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

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