|
-
Feb 7th, 2003, 03:02 AM
#1
Thread Starter
Addicted Member
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
-
Feb 7th, 2003, 03:06 AM
#2
Registered User
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.
-
Feb 7th, 2003, 03:18 AM
#3
Thread Starter
Addicted Member
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.
-
Feb 7th, 2003, 03:35 AM
#4
Registered User
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|