Data Reloads after SubmitChanges()

2 posts, 0 answers
  1. heavywoody
    heavywoody avatar
    79 posts
    Member since:
    Oct 2009

    Posted 08 Jun 2013 Link to this post

    For a reason I cannot figure out, after I do a SubmitChanges() in my DataGrid using RIA Services and DomainDataSource, after submitting a call is made to the server to reload the data into the grid again.  I am using Visual Studio 2010 Premiem so I can't use Intellitrace.  But I put a break on every method in the code behind.  It goes right from the function that does SubmitChanges to the  ObjectPermissionDomainDataSource_LoadedData event.   Here is the code I am using.

    <riaControls:DomainDataSource Name="tblDomainDataSource"
     Width="0"
     Height="0"
     AutoLoad="False"
     LoadSize="100"
     PageSize="100"
     QueryName="GetRightsQuery">
    <riaControls:DomainDataSource.DomainContext>
    <my:HEADomainContext/>
    </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>

    <telerikGridView:RadGridView Name="TblRightsRadGridView"
    Height="250"
    AutoExpandGroups="True"
    AutoGenerateColumns="False"
    HorizontalGridLinesBrush="DarkOliveGreen"
    ItemsSource="{Binding ElementName=TblDomainDataSource,
    Path=Data}"
    VerticalGridLinesBrush="DarkOliveGreen">


    Then the code basically ends with:

    TblDomainDataSource.SubmitChanges()

    Is there any other setting or anything I am missing that would make the data reload into the datagrid?  I just want to update the changes to the database and not reload the data.  I would have attached the code but it is quite large with the database.  So I hope there is something obvious or a setup I am just missing.
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 10 Jun 2013 Link to this post

    Hi,

    By design we will call Load after the changes are submitted so the view is refreshed from the server.

    If you don't want this, you can raise a flag when you are submitting changes, and then in the LoadingData event handler you can cancel the load.

    Regards,
    Rossen Hristov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top