datagridview and Edit button

r4k35h

Member
Joined
Sep 4, 2006
Messages
20
Programming Experience
Beginner
Hi,I have a problem using the data gridview in VB.NET 2005, the task is to create a datagrid and load a table from a database(which I did),when I click on the unique ID field an Edit button should appear at the end of the row and when that is clicked it should take us to another form/panel...is it possible to do this
 
Why bother with messing about with individual buttons for each record? To me that's much messier to code and less intuitive for the user. In this sort of siutation I have an Edit button the the form that is enabled if and only if a single record is selected. Clicking that button opens the currently selected record for editing. I then just handle the appropriate event(s) of the grid to change the Enabled property of the button as needed. I also handle the appropriate event(s) of the grid such that when the user double-clicks a row I call the PerformClick event of that button, thus the record that was double-clicked will be opened for editing as though the user clicked the button. To me, that's a more intuitive interface.
 
Back
Top