Hi All,
I am new to MVC i have to bind gridview with some report content individually on dropdown selected index change event.
The below code is my dropdown
<div class="form-group col-md-4">
@Html.DropDownList("bindReports", new List<SelectListItem>()
{
new SelectListItem() { Text= "Consolidated Purchases", Value = "cr" },
new SelectListItem() { Text= "Programs", Value = "gi" },
new SelectListItem() { Text= "Logistics", Value = "lg" },
new SelectListItem() { Text= "General Information", Value = "pr" }
}, "Select Report")
</div>
If i select Logistics an appropriate sp i need to call with ReportId as Parameter and bind gridview with logistics report details.. Kindly suggest with some answers
I have tried in this approach..
document.ready(function()
{
$('#bindReports').bind('change', function (e) {
getReportDetails('', '');
});
}
function getReportDetails() {
$.ajax({
url: urlPath,
success: function (result) {
},
error: function (xhr, status, error) {
showAlert("Error...!", error);
}
});
}
Join Hands Change lives
Thanks & Regards
Straight Edge Society