ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
the behavior of the DeleteConfirmView
Title:
B
I
{code}
?
In the AjaxListCrud Demo, the confirm dialog is shown as a popup, then after clicking on yes, the DeleteConfirmInput object get passed in the [HttpPost] Delete only has ID, other properties are null. How can I bind all the fields?
Save Changes
Cancel
Sean
asked at 18 Sep 2015
Answers
B
I
{code}
?
I think you want to show a more elaborate delete message, you have the Id, so you can get the rest of the information from your Db getbyId. but in order to send additional parameters you have to understand how the Id is sent the delete button in the grid is built using ClientFormat = GridUtils.DeleteFormatForGrid("DinnersGrid") and if you look in GridUtils you'll see something like this: awe.open('{0}', {{ params:{{ {1}: .{1} }} }}) and to make this easier to understand in this answer, basically you need to end up with something like this: awe.open('{0}', {{ params:{{ Id: .Id, Name: .Name, Bla: .Bla }} }}) note that .Id .Name .Bla get replaced by the grid in rendering process with values from grid model, and params:{ }, is the parameters that will be sent when loading the popup content awe.open(name, ... opens the popup
Save Changes
Cancel
Omu
answered at 18 Sep 2015
thanks, it worked!
at 18 Sep 2015
Sean
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK