on 09-08-2014 7:24 PM
suppose I have a datawindow.
I need to do following for data on this datawindow:
retrieve data from database: //use datawindow.Retrieve()
delete all data retrieved // How to do this? need to delete all rows from data by loop and then call Datawindow.Update()??? any simple way?
Insert new data to datawindow and save it //use datawindow.insertRow and then call DataWindow.Update()
what's the simple way to do this job?
You can use RowsMove Method. For example:
dw_1.RowsMove(1, dw_1.RowCount(), Primary!, dw_1,1, Delete!)
That will move the rows from the primary buffer to delete buffer and the rows are marked for deletion.
When you call dw_1.Update(), the rows in the Delete! buffer will be deleted.
Then you call dw_1.Reset() to clear the datawindow control.
Check on the RowsMove datawindow method for more details.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kent;
You might like to try DC's Reset ( ) method for that.
HTH
Regards .. Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.