0
초보자 질문이 있습니다.하지만이 질문에 내 머리를 찰니다. 데이터 표에 바인딩 된 표가 있습니다. 그리드, 페이징 및 필터링에 사용할 명시하지만, 데이터 어댑터에서 GET-호출에 allways는 GET-URL에 다음 매개 변수를 포함JQWidgets jqxGrid : 데이터 어댑터 및 페이징
나는 모든 데이터를 얻으려면?filterscount=0&groupscount=0&pagenum=0&pagesize=10&recordstartindex=0&recordendindex=18&_=1386768031615
는, 다음 페이징에 대한 클라이언트 측 캐시 및 필터링,하지만 첫 번째 단계에서 나는 단지 내 데이터를 그리드에 바인딩 싶어요.
여기 내 코드입니다 : 내가 어떤 데이터를 얻을 수없는
var source = {
type: "GET",
datatype: "json",
datafields: [
{ name: 'url' },
{ name: 'category', type: 'int' },
{ name: 'info' },
{ name: 'status', type: 'bool' }
],
url: '/api/redirects/Getallredirects',
id: 'id'
};
var dataAdapter = new $.jqx.dataAdapter(source, {
contentType: 'application/json; charset=utf-8',
loadError: function (xhr, status, error) {
alert(error);
},
downloadComplete: function (data) {
var returnData = {};
returnData.records = data.d;
return returnData;
}
});
$("#jqxgrid").jqxGrid({
source: dataAdapter,
filterable: false,
pageable: false,
virtualmode: false,
columns: [
{ text: 'URL', dataField: 'url', width: 100 },
{ text: 'Category', dataField: 'category', width: 100 },
{ text: 'Info', dataField: 'info', width: 180 },
{ text: 'Status', dataField: 'status', width: 80, cellsalign: 'right' },
]
});
의 GET 호출 때문에 자동으로 포함 매개 변수에 실패합니다. 어떻게 이러한 매개 변수를 제거합니까?
난 그냥 jqxGrid 설명서에 이러한 매개 변수에 대한 참조를 찾을 수 있지만 예를 들어, 어떻게 그들을 제거하지 않으려면 :
감사합니다 사전에 어떤 도움을.
와우는 모든 페이징을 제거 그룹화 및 필터 파라미터가, 감사합니다. 하나는 여전히 포함되어 있습니다 : '_ = 123456789'. 이게 뭐야, 어떻게 내가 그것을 제거 할 수 있을까? – fbrem
jQuery Ajax 함수의 캐시에서 가져온 것입니다. source.cache = true; 그것도 제거해야합니다. – scripto
스크립트, 고맙다, 내 모든 질문을 해결했습니다! – fbrem