0
votes

new in this field ...will be simple nd compact :

  • 1 datagridview
  • 6 buttons(new,save,cancel,edit,delete,update)
  • 5 text boxes(all enabled = false) , 1 combo box(all enabled = false)

on the click of new all textboxes and combo box are enabled.

  • fill the data
  • click on save ( saved in gridview textboxes are enabled=false and cleared)
  • in gridview click on row,the data in row is entered in respective textboxes.
  • click on edit u can edit it.
  • update it same row is updated and save it a new row is added.

Question is : i want to remove Update button and on save button i want to do coding for update and save ( both together) . .

can u help me ??

1
Is it just me or is this question hard to make any sense of? - Myles McDonnell
It´s not just you. The Grid aspect seems not to be the point, but just the Update and Save button functionality "multiplexing". I think he wants one button becoming Save or update depending on if new data has been entered or existing has been changed. - TheBlastOne
@user1113118 If you show us some code, we´ll be glad to be of helpful service :) - TheBlastOne

1 Answers

0
votes

If you look at your form in designer you'll see the update and save buttons.

If you look at their properties, in particular assigned events you'll see that they each have an OnClick event handler assigned. This is in the code file for the form.

You can delete the buttons from the form in the designer and call these event handlers from code. They will be declared as public methods on that forms class.