ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How can i bind Grid Data on dropdown change event
Title:
B
I
{code}
?
i have one dropdown and i select one vehicle id and bind the grid. Problem : when i select the dropdown ajax call twice so how to stop and bind the grid this is my ajax code : <script> $(function () { $(".chzn-select").chosen(); }); $("#ddlvehicleid").change(function () { var a = $("#ddlvehicleid").val(); $.ajax({ type: "GET", url: '@Url.Action("getVehicleInsuranceReport", "Report")', // we are calling json method datatype: "json", data: { vehiclidID: $('#ddlvehicleid').val() }, success:function (data) { alert(data); $('#grdVehicle').data('api').load(); return false; } }); }); </script>
Save Changes
Cancel
JD
asked at 22 Dec 2015
you could have used the Parent extension, there's no need for custom js here: Html.Awe().Grid("Grid1").Parent("ddlvehicleid","vehiclidID")... look at this page: http://demo.aspnetawesome.com/, first grid has a dropdown above it, when you change its value the grid will reload, you can look at the code from there
at 22 Dec 2015
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