Last post Nov 09, 2010 11:44 AM by gijigae
Member
10 Points
56 Posts
Nov 08, 2010 11:20 AM|gijigae|LINK
Hello All,
In the "Details" screen, when a user clicks on the "Edit" button, the fields are becoming editable and the button label changed to "Update".
Upon clicking on the "Update" button, the screen is navigated away from the "Details" screen and it moves to the "List" screen.
If I want to stay in the "Details" screen after Update, what should I do?
Best regards,
All-Star
17915 Points
5679 Posts
MVP
Nov 09, 2010 03:55 AM|sjnaughton|LINK
Hi Gijigae, try commenting out the ItemUpdated body and add the Updated event to the Data Source see code below, you can do similar from insert using the Inserted event.
protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e) { //if (e.Exception == null || e.ExceptionHandled) //{ // Response.Redirect(table.ListActionPath); //} } protected void DetailsDataSource_Updated(object sender, LinqDataSourceStatusEventArgs e) { if (e.Exception == null || e.ExceptionHandled) Response.Redirect(table.GetActionPath(PageAction.Details, e.Result)); }
Dynamic Data
Nov 09, 2010 11:44 AM|gijigae|LINK
Hi Steve,
Thanks for the reply!
I tried out your sample and modified data is stored, but the screen remains in an "Edit" screen.
Here is a URL that I captured after clicking on the "Update" button.
-------------
http://localhost:63600/DD_CascadeFT/stores/Edit.aspx?stor_id=6380
Have any idea why it stayed on the Edit screen when we redirected it to the Details screen (PageAction.Details)?
Member
10 Points
56 Posts
Control of screen flow upon clicking on Update button
Nov 08, 2010 11:20 AM|gijigae|LINK
Hello All,
In the "Details" screen, when a user clicks on the "Edit" button, the fields are becoming editable and the button label changed to "Update".
Upon clicking on the "Update" button, the screen is navigated away from the "Details" screen and it moves to the "List" screen.
If I want to stay in the "Details" screen after Update, what should I do?
Best regards,
All-Star
17915 Points
5679 Posts
MVP
Re: Control of screen flow upon clicking on Update button
Nov 09, 2010 03:55 AM|sjnaughton|LINK
Hi Gijigae, try commenting out the ItemUpdated body and add the Updated event to the Data Source see code below, you can do similar from insert using the Inserted event.
Dynamic Data
Always seeking an elegant solution.
Member
10 Points
56 Posts
Re: Control of screen flow upon clicking on Update button
Nov 09, 2010 11:44 AM|gijigae|LINK
Hi Steve,
Thanks for the reply!
I tried out your sample and modified data is stored, but the screen remains in an "Edit" screen.
Here is a URL that I captured after clicking on the "Update" button.
-------------
http://localhost:63600/DD_CascadeFT/stores/Edit.aspx?stor_id=6380
-------------
Have any idea why it stayed on the Edit screen when we redirected it to the Details screen (PageAction.Details)?
Best regards,