Datagrid event call problem
Posted on 2003-11-07
I'm using datagrid to show a set of data. The datagrid datasource is from an ado data control (adodc) which recordsource is from an SQL statement declared on form load.
datagrid1.datasource = Adodc1
querys1 = "select * from employee"
adodc1.recordsource = querys1
With this I have been able to populate the datagrid accordingly. Now.. to my problems.
I need to have a messagebox pop up everytime a user try to change the value of a column in the datagrid when the "add data" button was not clicked beforehand. No Problem with that.. a messagebox would appear everytime user change the value of a column in the datagrid, by using the beforecolupdate event call.
However, on every execution of the beforecolupdate event call, the new value that the user entered would be replaced by the old value again. Hence, the new value entered are not stored anywhere, and even though the message box appear and user choose to update the data, old data would still appear instead of new data.
My question : is there any event call that comes before beforecolupdate ? Because I have try using the afterColEdit event call but that doesn't get executed before the beforecolupdate event call, and therefore, I couldn't store the old value for further use when doing updating.
Any help please ?
Thanks a lot.