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

Data Reloads after SubmitChanges()

1 Answer 71 Views
DomainDataSource
This is a migrated thread and some comments may be shown as answers.
heavywoody
Top achievements
Rank 1
heavywoody asked on 09 Jun 2013, 03:37 AM
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.

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 10 Jun 2013, 07:27 AM
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.

Tags
DomainDataSource
Asked by
heavywoody
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or