Results 1 to 4 of 4

Thread: deleting rows

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    deleting rows

    hi all
    when i stands on grid i have row which has tablestyle and the grid is filtered by default view. the grid is filtered but i want to delete the current record in the database - which means to delete it from the dataset and update the database - how can i find the current row on which i stand of in the dataset and then delete it?

    thanks

  2. #2
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    If you have a databound datagrid and you select one row and press delete and the update the dataset, the deleted row should be deleted. I guess it has to be more to it, so please elaborate.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Posts
    175

    elaboration

    hi Athley
    thanks for replying me - i appreciate your help
    so here is the elaboration:
    i have
    data grid - grdCompConnWay

    grdCompConnWay.datasource = dsCompanies1.T_Companies
    (T_Companies -> table in the dataset)

    grdCompConnWay.datamember = T_resTCompanies
    (T_Res -> table in the dataset)

    T_resTCompanies - datarelation between T_Companies and T_res
    the T_res is table through which i present data and copy data into it from T_ConnectionDetails

    my aspiration is when i stands on grdCompConnWay (connection details of each company) grid and press delete button the current row will be deleted from the Res and T_Connectiondetails rables.

    i also use tablestyle to mask the grid.

  4. #4
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    As you are using a typed dataset you should be able to draw relations in the dataset in the application as well as in the database. Try and set up the relation in both application and database to be cascading updates. I've tried that in one of my projects and it deletes related records in the related table.

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