Reputation: 1372
In jqGrid, when you attempt to delete a row or set of rows, a confirmation box pops up saying
Delete selected record(s)?
I would like to add checkboxs and possibly other html controls to the confirmation box, that would add conditions to this delete operation.
An example of a condition would be flags to decide of to delete related items.
for example, the confirmation popup would have to following information:
You are about to delete (x) items
<input type="checkbox" name="condition1" value="condition1">Condition 1
<input type="checkbox" name="condition2" value="condition2">Condition 2
Of course I would also like to post these inputs back to the server along with the defaults posted by jqgrid delete.
So my questions are
Upvotes: 0
Views: 2432
Reputation: 222017
If I understand correct your requirements you should not modify existing Delete dialog. Instead of that you can just add your custom buttom to the navigator toolbar with respect of navButtonAdd. If you would use buttonicon:"ui-icon-trash"
the custom button will look like the original Delete button.
Then you can open any Dialog as the reaction on the onClickButton
. If the user click submit button in your dialog you can post the choosed ids manually using jQuery.ajax. If you examine the code and the demo from the old answer you could find many code fragmants which you could use.
Upvotes: 1
Reputation: 1428
I would take the following steps:
Upvotes: 0