jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Unable to load data (keep "Loading…")
Tagged: grid column
This topic contains 2 replies, has 2 voices, and was last updated by imjava1974 11 years, 4 months ago.
-
Author
-
Hi ,
After i upgraded my grid to v3.1.0 , the grid keeps loading for long time when i define the column like case (a):
(a) Unable to load data , grid show “Loading …” for long time , Console error message = Uncaught TypeError: Object 1 has no method ‘match’.
column code =>
{ text: ‘Sorting’, filterable:true, filtertype: ‘checkedlist’, datafield: ‘sorting’, width:150, align:’center’, editable:false},However, if i define the column like case (b), no problem.
(b) Load data successfully.
{ text: ‘Sorting’, datafield: ‘sorting’, width:5, cellsformat: ‘n’, filterable: true, align:’center’, editable:false},Can you help?
Below is the My codesvar theme = getTheme();
var data = ‘<?php include(“datasource.php”);?>’;
var source =
{
datatype: “json”,
datafields: [
{ name: ‘shipment_id’, type: ‘number’},
{ name: ‘ref_no’, type: ‘string’ },
{ name: ‘so_id’, type: ‘string’},
{ name: ‘name’, type: ‘string’ },
{ name: ‘last_modified_date’, type: ‘date’},
{ name: ‘status’, type: ‘string’ },
{ name: ‘remark’, type: ‘string’},
{ name: ‘status_code’, type: ‘string’},
{ name: ‘sorting’, type: ‘number’},
{ name: ‘item’, type: ‘string’ },
{ name: ‘approve_date’, type: ‘date’},
{ name: ‘approved_by’, type: ‘string’},
{ name: ‘issued_by’, type: ‘string’},
{ name: ‘si_issue_date’, type: ‘date’}
],
updaterow: function (rowid, rowdata, commit) {
// synchronize with the server – send update command
// call commit with parameter true if the synchronization with the server is successful
// and with parameter false if the synchronization failder.
uploaddata=rowdata;
commit(true);
},
localdata: data
};$(“#jqxgrid”).jqxGrid(
{
width: 950,
height:400,
sortable: true,
columnsresize: true,
source: dataAdapter,
showfilterrow: true,
filterable: true,
altrows: true,
theme: theme,
enabletooltips: true,
selectionmode: ‘singlerow’,
editable: true,
enablehover: false,
ready: function (){
$(“#jqxgrid”).jqxGrid(‘hidecolumn’, ‘shipment_id’);
$(“#jqxgrid”).jqxGrid(‘hidecolumn’, ‘status_code’);
$(“#jqxgrid”).jqxGrid(‘hidecolumn’, ‘sorting’);},
columns: [
{ text: ‘ID’, datafield: ‘shipment_id’, width:70, cellsformat: ‘n’, filterable: true, align:’center’, editable:false},
{ text: ‘Customer PO No.’, filterable:true, filtertype: ‘textbox’, cellsalign:’left’, datafield: ‘so_id’, width:150, align:’center’, editable:false},
{ text: ‘SI No.’, filterable:true, filtertype: ‘textbox’, cellsalign:’center’, datafield: ‘ref_no’, width:100, align:’center’, editable:false},
{ text: ‘Account’, filtertype: ‘textbox’, datafield: ‘name’, width:130, align:’center’, editable:false },
{ text: ‘Item’, filtertype: ‘textbox’, datafield: ‘item’, width:120, align:’center’, editable:false },
{ text: ‘Remark’, datafield: ‘remark’, columntype: ‘textbox’, filtertype: ‘textbox’, filtercondition: ‘contains’, width: 100 , editable: false, cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties) {
var str = value;
var res = str.replace(” “, “\n”);
return res;
}
},
{ text: ‘S.I Status’, filterable:true, filtertype: ‘checkedlist’, datafield: ‘status’, width:150, align:’center’, editable:false},
{ text: ‘Last Modified On’, filterable:true, cellsalign:’center’, datafield: ‘last_modified_date’, filtertype:’date’, width:120, align:’center’, cellsformat:’yyyy-MM-dd’, editable:false},
// case (a) { text: ‘Sorting’, filterable:true, filtertype: ‘checkedlist’, datafield: ‘sorting’, width:150, align:’center’, editable:false},
{ text: ‘Sorting’, datafield: ‘sorting’, width:5, cellsformat: ‘n’, filterable: true, align:’center’, editable:false},
{ text: ‘S.I Status’, filterable:true, filtertype: ‘checkedlist’, datafield: ‘status_code’, width:100, align:’center’, editable:false, cellsalign:’center’},
{ text: ‘SI Issue Date’, datafield: ‘si_issue_date’, filtertype:’date’, cellsformat: ‘MMM dd, yyyy’, width: 100 , editable: false},
{ text: ‘Issued by’, datafield: ‘issued_by’, columntype: ‘textbox’, filtertype: ‘textbox’, filtercondition: ‘contains’, width: 100 , editable: false},
{ text: ‘Approve Date’, datafield: ‘approve_date’, filtertype:’date’, cellsformat: ‘MMM dd, yyyy’, width: 100 , editable: false},
{ text: ‘Approved by’, datafield: ‘approved_by’, columntype: ‘textbox’, filtertype: ‘textbox’, filtercondition: ‘contains’, width: 100 , editable: false},
]
});Hi,
Could you reproduce that with jQWidgets 3.2.0? I am asking about that, because we fixed a similar issue to the one which you describe in your post.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Hi Peter,
Tested with version 3.2.0, the problem doesn’t appear anymore.
Great fix.
Thanks. -
AuthorPosts
You must be logged in to reply to this topic.