ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How add function when delete row of Grid ?
Title:
B
I
{code}
?
I make CRUD Grid by use CrudHelpers Class in demo help build in InitCrudPopupsForGrid method i want to add more process when delete row I try change code from .Success("utils.itemDeleted('" + gridId + "')") to .Success("deletePurchaseChildSuccess") and add my js funciton code in view page (PurchaseChildGrid is name of my Grid) function deletePurchaseChildSuccess() { utils.itemDeleted("PurchaseChildGrid"); changeFieldCal(); } but utils.itemDeleted("PurchaseChildGrid") is not work have no any fade at deleted row and row isn't fade to hide pls suggest me Remark : Before that I try change is .Success("deletePurchaseChildSuccess('" + gridId + "')") and function deletePurchaseChildSuccess(gridId ) { utils.itemDeleted(gridId ); changeFieldCal(); } but deletePurchaseChildSuccess is called when page load that I don't want , I want it is called when row delete only
Save Changes
Cancel
nutfergie
asked at 27 Sep 2017
`utils.itemDeteled` returns a function so you need to call `utils.itemDeleted("PurchaseChildGrid")({ Id: IdOfDeletedRow })`
at 27 Sep 2017
Omu
How I get IdOfDeletedRow in view page ?
at 27 Sep 2017
nutfergie
the success function gets the result from the server as a parameter, that's how the function from utils.js gets it, look in the demos for the `POST` Edit action
at 27 Sep 2017
Omu
My code have worked Thx for your suggest function deletePurchaseChildSuccess(obj) { utils.itemDeleted("PurchaseChildGrid")({ Id: obj.Id }); changeFieldCal(); }
at 27 Sep 2017
nutfergie
Answers
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