Vlad
07-18-2000, 12:54 PM
Hi. In a project I am currently working on I have a data source which is not a common-type database. I created an encapsulated class by using the ADODB.Recordset and bound it to the DataGrid control at run-time.
Everything works just fine: it lets me add/modify the data in the grid BUT I need to be able to actually UPDATE my external data source when the corresponding recordset is updated through the Grid. The actual updating of the data file is done by 3 different external functions: AddRow, ModifyRow, DeleteRow.
The datagrid AfterUpdate and BeforeUpdate events don't help much as they do not distinguish the 3 operations, i.e. you don't know whether the Update was initiated by adding,modifying or deleting a row.
I am not happy to think of tracing all possible keypress events to be able to handle that situation. There must be a more beautiful way to solve the problem. Maybe there're any hints/ideas on that matter? Maybe there're other grid-type controls available that take care of that?
Thanks,
Everything works just fine: it lets me add/modify the data in the grid BUT I need to be able to actually UPDATE my external data source when the corresponding recordset is updated through the Grid. The actual updating of the data file is done by 3 different external functions: AddRow, ModifyRow, DeleteRow.
The datagrid AfterUpdate and BeforeUpdate events don't help much as they do not distinguish the 3 operations, i.e. you don't know whether the Update was initiated by adding,modifying or deleting a row.
I am not happy to think of tracing all possible keypress events to be able to handle that situation. There must be a more beautiful way to solve the problem. Maybe there're any hints/ideas on that matter? Maybe there're other grid-type controls available that take care of that?
Thanks,