search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Assistance with a query please .. to do with the DPS, context menu, multi view controls...

Asked by mrplatypus
5 years ago.

Hi Dan and Team,

I hope you can help with a query I have:

With the DayPilotScheduler Control, I am doing a database update as a result of the user selecting an item from the context menu.
The "update" occurs and returns a list of records which would be affected...

With the results of the database stored procedure, I want to show the results with an option for the user to confirm whether they really do want to make the change given that additional the records would be affected...

I want to use a multiview control to display the results....

However, as the context menu click event happens after a page postback, the multiview control doesn't want to display the other view...

Please advise on how I can get the application working the way I would like?

Alternatively, please would you suggest another way of achieving the same goal?

Thanks & Regards

mrplatypus (aka Dave)

Answer posted by Dan Letecky [DayPilot]
5 years ago.

Hi Dave,

If I understand it correctly, you want to display a kind of confirmation before the action is performed and the confirmation should display some dynamic data loaded from the server.

I personally find it difficult to maintain the page state between PostBacks so I would suggest storing it in the DB, at least temporarily. It might be an overkill in your situation but I would do something like this:

1. Let the context menu fire a quick AJAX request that would return a request id (that would be a number identifying the action). On the server-side, save this request to a DB (generate an id + save the request parameters).
2. As soon as the response is received, use the id to display a standalone page (e.g. AffectedRecords.aspx?id=X) in a modal dialog. That page will display the dynamic content based on the id parameter. Let the user decide whether to continue.
3. As soon as the user confirms the action, perform it and close the modal dialog. You can also delete the record if you don't want to keep it for log purposes.

Let me know if this doesn't work for you or if I'm missing something.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.