Updating dabase from Radgridview

3 posts, 1 answers
  1. Pedro Filipe
    Pedro Filipe avatar
    8 posts
    Member since:
    Jan 2019

    Posted 04 Jan 2019 Link to this post

    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. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3567 posts

    Posted 09 Jan 2019 Link to this post

    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.
  3. Pedro Filipe
    Pedro Filipe avatar
    8 posts
    Member since:
    Jan 2019

    Posted 11 Jan 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    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,

     

     

Back to Top