asp.net datagrid delete row

Discussion in 'OT Technology' started by michelin man, Mar 30, 2004.

  1. michelin man

    michelin man IDB Construction

    Joined:
    Jul 22, 2001
    Messages:
    11,660
    Likes Received:
    0
    Location:
    Austin
    does anyone have an example of how you would delete a row in a datagrid?

    I don't want to delete the row from the database, just delete it from the datagrid.
     
  2. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    I can't answer your question, but if your data grid is based on the database, it's one and the same. So if you don't want to delete the data really, create a subset of the database in another table and base the datagrid on that. Then you can delete it without affecting the real database.

    That's my logical answer without ever using the language however.
     
  3. michelin man

    michelin man IDB Construction

    Joined:
    Jul 22, 2001
    Messages:
    11,660
    Likes Received:
    0
    Location:
    Austin
    that's just it, i need to create a "temp" table in the program but i don't know how....
     
  4. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    You create the temp table in the database - so you send a string like:

    SELECT RealTable.RealTableID, RealTable.Data INTO TempTable
    FROM RealTable
    WHERE RealTable.Data = 'insert criteria here'

    And send that off to the database engine.
     

Share This Page