ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Close NestCreate on Load of Grid
Title:
B
I
{code}
?
I'd like to close a NestedCreate form when the grid is reloaded. I've tried started with Grid events (http://aspnetawesome.com/learn/mvc/Grid#Api) I'm getting the expected console.log objects on reload but not getting the the nested form to close, is there a difference between popup and nested? $(function () { $('#MemberManagerGrid').on('aweload', function (event, data, requestData) { console.log('aweload handled', data, requestData); var pu = $('#MemberManagerGrid').closest('.awe-popup').data('api'); if (pu) { pu.close(); } }); }); On debugging I'm getting undefined for the pop-up selector. Thanks ...
Save Changes
Cancel
Stephan
asked at 28 Mar 2017
you're not selecting the popup correctly, `.closest` is going up the tree, you need `.find` https://api.jquery.com/closest/
at 29 Mar 2017
Omu
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