jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Failed to load resource
Tagged: Failed to load resource
This topic contains 0 replies, has 1 voice, and was last updated by shashank.bargaje 10 years, 11 months ago.
-
AuthorFailed to load resource Posts
-
Hello,
I implemented the JqxGrid bind with web service by following the Demo. I just replaced the url as my data is returning on the code behind instead of the web service. The error is showing Failed to load resource. Please help
<script type=”text/javascript”>
$(document).ready(function () {
var source = {
type: “GET”,
datatype: “json”,
datafields: [
{ name: ‘last name’ },
{ name: ‘gender’ }
],
url: ‘http://localhost:1216/About.aspx/GetData’,
cache: false
// root: ‘data’
};//Preparing the data for use
var dataAdapter = new $.jqx.dataAdapter(source, { contentType: ‘application/json; charset=utf-8’,
downloadComplete: function (data, textStatus, jqXHR) {
return data.d;
}
}
);$(“#jqxgrid”).jqxGrid({
source: dataAdapter,
width: ‘70%’,
height: ‘40%’,
pageable: true,
selectionmode: ‘checkbox’,
sortable: true,
// columnresize:true,
columns: [
{ text: ‘Last Name’, dataField: ‘last name’, width: 100 },
{ text: ‘First Name’, dataField: ‘gender’, width: 100 }
]
});var listSource = [{ label: ‘Name’, value: ‘lastname’, checked: true }, { label: ‘First Name’, value: ‘gender’, checked: true }
];
$(“#jqxlistbox”).jqxListBox({ source: listSource, width: 200, height: 200, checkboxes: true }
);
$(“#jqxlistbox”).on(‘checkChange’, function (event) {
$(“#jqxgrid”).jqxGrid(‘beginupdate’);
if (event.args.checked) {
$(“#jqxgrid”).jqxGrid(‘showcolumn’, event.args.value);
}
else {
$(“#jqxgrid”).jqxGrid(‘hidecolumn’, event.args.value);
}
$(“#jqxgrid”).jqxGrid(‘endupdate’);
});
});
</script> -
AuthorPosts
You must be logged in to reply to this topic.