Click to See Complete Forum and Search --> : making datagrid control editables
mulakhail
Oct 28th, 2008, 12:57 PM
I recently started my new job where they r still using vb 6.0. I am creating an app that is simple database update app. I have created a datagrid control and set the datasource property properly. The datagrid retrieves the data but I can not change the data directly on the grid. The grid is not editable. Is this even possible? or am I chasing my tail? I would think the datagrid will be editable because 'AllowUpdate' and AllowAddNew properties are set to true as well. What am I missing, please help.
Hack
Oct 28th, 2008, 01:15 PM
Welcome to the forums. :wave:
I do not believe the datagrid is editable (although I've never actually used it as everything I read about it reenforced its lack of flexibility). You would need to edit the record in your database, clear and reload the grid.
mulakhail
Oct 28th, 2008, 02:08 PM
hack: thank u very much for ur reply, i m very new to vb although I have quite a few yrs programming in powerbuilder and other 4gls. What I am trying to do is allow my users edit the data I retrieve from the database and then allow them to modify it. If I can not use datagrid for it what control vb community usually uses to perform this simple database app functionality? Pl tell me that I do not have to take the data from the row they have selected and populate bunch of text boxes, allow my users to edit the text boxes with the new values and then update the database and refresh the datagrid? pl let me know there is an easier way in vb. thanks for ur help
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.