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

Submit not working on RadDataForm

3 Answers 87 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 08 Mar 2012, 08:18 PM
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

3 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 12 Mar 2012, 01:49 PM
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 >>
0
Nick
Top achievements
Rank 1
answered on 12 Mar 2012, 02:10 PM
I have tried the code in dataServiceDataSource_SubmittedChanges and dataServiceDataSource_SubmittingChangesevents.  Both have not worked.

Please advise.

Thanks,
Jorge

0
Ivan Ivanov
Telerik team
answered on 15 Mar 2012, 12:42 PM
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 >>
Tags
DataForm
Asked by
Nick
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Nick
Top achievements
Rank 1
Share this question
or