Edit Records from DBGrid

Im just new in Delphi Programming so I hope somebody could help me with this. How do I link a DBEdit box and combobox to a DBGrid columns(which is connected to a database) so as when I click a record from the dbgrid I can edit or delete that record using the editbox, combobox and command buttons. I also need to add records by clicking an ADD button and the type the the data in the edit boxes and combo boxes. And also, I want to restrict the user to type anything in the DBGrid, I want all editing in the editboxes, how do I do this? Hope somebody could help me. Thanks.
Who is Participating?
kretzschmarConnect With a Mentor Commented:
use the same datasource for the grid and your dbedits,
set the grid readonly (property)

you could use three buttons

new-method=datasource1.dataset.insert; //or append

//following is only available, if edited or new

you could also use a tdbnavigator for this
(just connect it to the same datasource)

hope this helps

meikl ;-)

sharolAuthor Commented:
is this also possible if the list/items of the combo box is coming from another table?

you could use a tdbcombobox or a tdblookupcombobox

by the tdbcombobox you've to fill the entries at appstart

meikl ;-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.