ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Force grid refresh
Title:
B
I
{code}
?
I am trying to implement selection from a multi-page grid by toggling a bit on the database row via ajax. The ajax database update works when I click a row, but refreshing of the grid doesnt happen on every click. The grid up to the columns looks like: @Html.Awe().Grid("RequisitionsGrid").Url(Url.Action("BEEGetItems", "ReqGrid"))... & the refresh / ajax is as follows: function refreshGrid() { $('#RequisitionsGrid').data('api').load({}); } $(function () { $('#RequisitionsGrid').on('aweselect', function () { var x = $.map($(this).data('api').getSelection(), function (val) { return val.Id; }); $.ajax({ url: "@Url.Action("BEEToggle","ReqGrid")", data: { Id: x.toString() }, type: "post", success: refreshGrid() }); }); });
Save Changes
Cancel
Ratladi
asked at 24 Apr 2014
the `$.ajax success:` is of type `function`, you're giving it the result of `refreshGrid()` which is not a function, remove the `()` from "success: refreshGrid()"
at 24 Apr 2014
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