jQWidgets Forums
Forum Replies Created
-
Author
-
September 12, 2012 at 6:45 pm in reply to: Strange behavior of checkbox column Strange behavior of checkbox column #7836
Hi Peter,
Now it works perfect – thanks for your help.
September 12, 2012 at 2:03 pm in reply to: Strange behavior of checkbox column Strange behavior of checkbox column #7795Ok, I think, I found a problem…
…depends on data I am trying to display.NIP value sometimes can be written with and sometimes without sign “-“, eg. “8791312383”, or “879-131-23-83”.
What is strange, until json file contains no strings with “-” signs, everything seems to work. As soon as I insert at least 1 string with “-” sign, JS error occurs.September 12, 2012 at 1:30 pm in reply to: Strange behavior of checkbox column Strange behavior of checkbox column #7792Hi Peter,
The problem is that in your code all works fine, but if you change localdata to external url then error occurs.
The very strange for me is that the grid contains 4 text columns with 4 text filters; 3 works fine and only the 4th generates error.September 12, 2012 at 1:01 pm in reply to: Strange behavior of checkbox column Strange behavior of checkbox column #7788Hi Peter,
The checkbox column is fine now.
Unfortunatelly, the strange TypeError: x is null error still exists. Do you have any ide what can be the reason?September 12, 2012 at 12:58 pm in reply to: filterchoosestring cannot be localized filterchoosestring cannot be localized #7787Hi Peter,
Works perfect.
Thanks
September 12, 2012 at 10:23 am in reply to: Strange behavior of checkbox column Strange behavior of checkbox column #7773Hi Peter,
datafields definition as bool helped (checkbox rendering is fine now), however filter row still doesn’t work as I would expect:
TypeError: s.filter.getfilters()[0] is undefined
for checkbox filter
and
TypeError: x is null
for NIP column filter (see code below)var sWidth = $(window).width()-40;var url = "ajax/companies_functions.php?f_case=1";var getAdapter = function() {var source ={datatype: "json",datafields: [{ name: 'ID' },{ name: 'Name' },{ name: 'Street' },{ name: 'City' },{ name: 'NIP' },{ name: 'Recipient', type: 'bool' },{ name: 'Supplier', type: 'bool' }],id: 'id',url: url,root: 'data'};var dataAdapter = new $.jqx.dataAdapter(source);return dataAdapter;}$("#companies").jqxGrid({width: sWidth,source: getAdapter(),theme: theme,sortable: true,columnsresize: true,showstatusbar: true,filterable: true,showfilterrow: true,autoshowfiltericon: true,ready: function () {$("#companies").jqxGrid('hidecolumn', 'ID');},columns: [{ text: 'ID', datafield: 'ID', columntype: 'textbox', width: sWidth*0.05 },{ text: 'Company name', datafield: 'Name', columntype: 'textbox', width: sWidth*0.4 },{ text: 'Address', datafield: 'Street', columntype: 'textbox', width: sWidth*0.3 },{ text: 'City', datafield: 'City', columntype: 'textbox', width: sWidth*0.15 },{ text: 'VAT number', datafield: 'NIP', columntype: 'textbox', width: sWidth*0.08, cellsalign: 'center' },{ text: 'Rec', datafield: 'Recipient', type: 'bool', columntype: 'checkbox', filtertype: 'bool', width: sWidth*0.029 },{ text: 'Sup', datafield: 'Supplier', type: 'bool', columntype: 'checkbox', filtertype: 'bool', width: sWidth*0.029 }]});$("#companies").bind('bindingcomplete', function () { localiseGrid("companies"); });
-
AuthorPosts