Can't Edit database

2 posts, 0 answers
  1. Aldy
    Aldy avatar
    8 posts
    Member since:
    Sep 2015

    Posted 09 Nov 2015 Link to this post

    hello i'm trying to edit database from RadGridView, i'm using Scimore database and is connected to my GridView. I bind the itemsSource But if i change the data from Gridview, the database is not updated. why? how can i do that?

    Here's my code :


            <StackPanel x:Name="LayoutRoot">
                <telerik:RadGridView x:Name="dataGrid1"
                                     ShowGroupPanel ="False"
                                     CanUserReorderColumns ="False"
                                     ItemsSource="{Binding datatable.DefaultView}">


    public partial class MainWindow : Window
            public MainWindow()
                string dbInstanceName = "C:\\Users\\Admin\\Documents\\Visual Studio 2010\\Projects\\DisplayDB\\DisplayDB\\configdb";
                ScimoreEmbedded em = new ScimoreEmbedded();
                    using (ScimoreConnection cn = em.CreateConnection())
                        string Query = "select idx,tag,value from";
                        ScimoreCommand createCommand = new ScimoreCommand(Query, cn);
                        ScimoreDataAdapter dataAdp = new ScimoreDataAdapter(createCommand);
                        DataTable dataTable = new DataTable("info");
                        dataGrid1.ItemsSource = dataTable.DefaultView;
                catch (Exception)

  2. Maya
    Maya avatar
    4062 posts

    Posted 11 Nov 2015 Link to this post

    Hi Aldy,

    RadGridView will not save the changes to the database since it does not know what its type is. You need to do that explicitly by calling the corresponding method. 
    For example, you can handle RowEditEnded event and call the save changes method that will push the modifications to your db.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top