Submit not working on RadDataForm

4 posts, 0 answers
  1. Nick
    Nick avatar
    10 posts
    Member since:
    Sep 2010

    Posted 08 Mar 2012 Link to this post

    Hello,

    I am using a RadDataForm to submit to a RadDataServiceDataSource.  I have a redirect in order to refresh the page AFTER submit.  For some reason when I click on OK to submit changes after an Edit form or New record is added, submit is not happening but redirect happens.  Its as if the redirect is faster than the submit and it does not wait for the changes to be applied before redirecting.

    I have tried to add this line below but it is not working.

    Dispatcher.BeginInvoke(()=> { if (!dataServiceDataSource.IsBusy) HtmlPage.Window.Navigate(new Uri("site goes here"))});

    Please help.

    Note: If I remove the redirect, submit will work without issue.  But I need the redirect as it served to refresh the page with the newly submitted data.

    Thanks,
    Jorge
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 12 Mar 2012 Link to this post

    Hello Jorge,

    Would you please confirm on which event you are calling the redirect so that we could test a similar scenario on our side?

    Kind regards,
    Ivan Ivanov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Nick
    Nick avatar
    10 posts
    Member since:
    Sep 2010

    Posted 12 Mar 2012 Link to this post

    I have tried the code in dataServiceDataSource_SubmittedChanges and dataServiceDataSource_SubmittingChangesevents.  Both have not worked.

    Please advise.

    Thanks,
    Jorge

  5. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 15 Mar 2012 Link to this post

    Hello Jorge,

    I believe that the SubmittedChanges event is raised too early to be used for this purpose. Would you please try redirecting on RadDataServiceDataSource's LoadedData event? Please, be advised that it is raised in various occasions, so that you should implement some flag-based logic that will redirect only on its appropriate occurrences.

    Kind regards,
    Ivan Ivanov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top