DataServiceDataSource Submit Changes problem

4 posts, 0 answers
  1. Devopriyo
    Devopriyo avatar
    1 posts
    Member since:
    Dec 2011

    Posted 22 Dec 2011 Link to this post

    Hi
         I am currenty developing WPF applications which will consume a wcf data service with works with entity framework 4.1 code first . In WPF application I am using Radgridview and RadDataServiceDataSource

       following the code in XAML page
     
                  <telerik:RadDataServiceDataSource Height="100" HorizontalAlignment="Left" Margin="208,242,0,0" Name="radDataServiceDataSource1" VerticalAlignment="Top" Width="100" QueryName="Currency" AutoLoad="True" SubmittingChanges="radDataServiceDataSource1_SubmittingChanges">
                <telerik:RadDataServiceDataSource.DataServiceContext >
                    <local:MyBaazaarContext/>
                </telerik:RadDataServiceDataSource.DataServiceContext>
            </telerik:RadDataServiceDataSource>
            <telerik:RadGridView Grid.Row="0" ItemsSource="{Binding DataView, ElementName=radDataServiceDataSource1}" IsBusy="{Binding IsBusy, ElementName=radDataServiceDataSource1}" ShowGroupPanel="False" Name="grdDetails"  />
     
    When I am making changes in the gridview an calling   radDataServiceDataSource1.SubmitChanges() nothings getting change.


    please Help

    Thanks In Advance
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 22 Dec 2011 Link to this post

    Hello,

    Unfortunately we could not reproduce the behavior that you describe. 

    Can you please send us a runnable sample project that demonstrates how the SubmitChanges method does not work?

    Thanks in advance.

    All the best,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Heiko
    Heiko avatar
    124 posts
    Member since:
    Oct 2012

    Posted 23 Dec 2011 Link to this post

    We ran into similar problems, and in the end it was the rights-management of the wcf data service which caused the problems. You should carefully check if all necessary access rules are set for the entity you want to save, which is done in the InitializeService method. NOTE: for saving an entity via wcf data service it is NOT enough to set "EntitySetRights.All" but also set "EntitySetRights.WriteAppend" and "EntitySetRights.WriteMerge" which results in the following line of code:

    config.SetEntitySetAccessRule("myEntity", EntitySetRights.All | EntitySetRights.WriteAppend | EntitySetRights.WriteMerge);

    Also it us very useful to use something like fiddler to check the traffic between client and service.
    hth
  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 26 Dec 2011 Link to this post

    Hi,

    Thanks for the information. I am sure that it will be useful for other people as well.

    Greetings,
    Ross
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top