This is a migrated thread and some comments may be shown as answers.

Updating dabase from Radgridview

2 Answers 274 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pedro Filipe
Top achievements
Rank 1
Pedro Filipe asked on 04 Jan 2019, 05:34 PM

hi 

 

i have a problem i want save my data from gridview to dabase including update, deleting a row and adding a row

i populate radgridview from a datatable.

 

my delete button is click event on a image 

and my addnew row is the button from da radgridview

the add new row works almost fine (the click event are not firing on the images.) but add the row to the database.

the delete "button" remove the row from datagrid but is not working removing from the database only radgrid,

is there way i can add delete and update radgridview and then i press a button and update the database?

 

 

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Jan 2019, 09:43 AM
Hello, Pedro Filipe,  

I would recommend you to have a look at the following help article demonstrating how to handle updating to database when you add/edit or delete a row: https://docs.telerik.com/devtools/winforms/controls/gridview/populating-with-data/updating-the-database-with-ado.net

I hope this information helps. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Pedro Filipe
Top achievements
Rank 1
answered on 11 Jan 2019, 09:04 AM

thanks for the answer,

 

i did a bit diferent aproach. 

- add 2 boolean columns (edited, new)

-deleted row is added to a list

 

then when i press the update button

- add new lines first 

- delete rows

- update edited rows 

 

thanks once again 

 

best regards,

 

 

Tags
GridView
Asked by
Pedro Filipe
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Pedro Filipe
Top achievements
Rank 1
Share this question
or