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

Confirm Insert based on DB Query

2 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 30 Apr 2014, 11:16 AM
Hello,

I'm currently working on a DataGrid to show and insert events with an id, name and start- / end date. Trying to achieve a probably comforting, but also useful info for the user, I have following problem:

The user gets a custom edit form as a popup to enter a new event. Now, when clicking on "Insert", he should be notified if there already exists an event (DB side) and confirm again (!) the insert. I read the post here http://www.telerik.com/forums/adding-confirmation-to-update-insert-cancel-buttons which is helpful, but not sufficient to solve this expected behaviour. So in short again:

- after inserting new values for a new event
  - click "Insert"
  - server-side call the database and check if one or more events exist in given period of the new entry
  - if not, just insert entry
  - if so, show confirmation dialog "There is already an event. Do you want to continue (inserting) ? "
    - if yes, insert
    - if no, cancel

Thanks very much!

Regards,

Jan

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 02 May 2014, 03:00 PM

Hello Jan,

The following help article explains the specifics of such a scenario and offers simple examples: http://www.telerik.com/help/aspnet-ajax/window-using-radconfirm-in-server-code.html. You can further tweak them to match your needs - using proper events, storing the needed data somewhere (e.g., in the ViewState or Session).


Regards,

Marin Bratanov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jan
Top achievements
Rank 1
answered on 05 May 2014, 07:47 AM
Hello Marin,

works perfectly. Thank you very much!
Tags
Grid
Asked by
Jan
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Jan
Top achievements
Rank 1
Share this question
or