jQWidgets Forums
jQuery UI Widgets › Forums › Grid › JqxGrid error in column Filter
This topic contains 3 replies, has 2 voices, and was last updated by Ivo Zhulev 8 years, 11 months ago.
-
Author
-
I have a JQXGrid so structured:
$(document).ready(function () {
var data = {};
var theme = ‘light’;
var source =
{
datatype: “json”,
datafields: [
{ name: ‘Id’ }, // Chiave primaria, int, idenity, not null
{ name: ‘ownerLead’ },
{ name: ‘DataLead’ },
{ name: ‘origineLead’ },
{ name: ‘statoLead’ },
{ name: ‘incarico’ },
{ name: ‘cognome’ },
{ name: ‘nome’ },
{ name: ‘azienda’ },
{ name: ‘referente’ },
{ name: ’email’ },
{ name: ‘mobile’ },
{ name: ‘telefono’ },
{ name: ‘fax’ },
{ name: ‘codFis’ },
{ name: ‘pIva’ },
{ name: ‘indFatt’ },
{ name: ‘modPag’ },
{ name: ‘ibanCdc’ },
{ name: ‘statoFatt’ },
{ name: ‘ut’ },
{ name: ‘franchigia’ },
{ name: ‘percStorni’ },
{ name: ‘percInd’ },
{ name: ‘gestore’ },
{ name: ‘cluster’ },
{ name: ‘storniRic’ },
{ name: ‘storniOtt’ },
{ name: ‘indRic’ },
{ name: ‘indOtt’ },
{ name: ‘riaccrRic’ },
{ name: ‘riaccrOtt’ },
{ name: ‘spIstRic’ },
{ name: ‘spIstOtt’ },
{ name: ‘ticketAtt’ },
{ name: ‘ticketMat’ },
{ name: ‘esito’ },
{ name: ‘regCorGr1’ },
{ name: ‘statoPratGr1’ },
{ name: ‘dataConcGr1’ },
{ name: ‘dataPresGr1’ },
{ name: ‘stPratGr2’ },
{ name: ‘dataDefGr2’ },
{ name: ‘dataPresGr2’ },
{ name: ‘dataInsLead’ },
{ name: ‘dataUltimaMod’ },
{ name: ‘dataInsAperto’ },
{ name: ‘dataInsChiuso’ },
{ name: ‘dataInsKO’ }
],
id: ‘Id’,
url: ‘GetKO’
//sortcolumn: ‘DataUltimaMod’
//sortdirection: ‘asc’
};
// clear the filtering.
$(‘#clearfilteringbutton’).click(function () {
$(“#jqxgrid”).jqxGrid(‘clearfilters’);
});
// show/hide filter background
$(‘#filterbackground’).on(‘change’, function (event) {
$(“#jqxgrid”).jqxGrid({ showfiltercolumnbackground: event.args.checked });
});
// show/hide filter icons
$(‘#filtericons’).on(‘change’, function (event) {
$(“#jqxgrid”).jqxGrid({ autoshowfiltericon: !event.args.checked });
});
var tooltiprenderer = function (element) {
$(element).jqxTooltip({ position: ‘mouse’, content: $(element).text() });
}
// initialize jqxGrid
$(“#jqxgrid”).jqxGrid(
{
rowsheight: 40,
height: ‘100%’,
width: ‘97%’,
source: source,
theme: ‘light’,
pagesize: 20,
columnsresize: true,
showfilterrow: true,
filterable: true,
pageable: true,
localization: getLocalization(‘it’),
editable: false,
sortable: true,
altrows: true,
groupable: false,
showstatusbar: false,
showaggregates: false,
showtoolbar: false,
ready: function () {
$(“#jqxgrid .jqx-button”).css({ “height”: “35px” });
},
columns: [
{
text: ‘Del’, datafield: ‘Del’, columntype: ‘button’, width: 40, filterable: false, sortable: false, menu: false, cellsrenderer: function () {
return ‘<div style=”width: 100%;” onclick=”eliminaLead();”></div>’;
},
},
{
text: ‘Mod’, datafield: ‘Mod’, width: 40, columntype: ‘button’, filterable: false, sortable: false, menu: false,
cellsrenderer: function () {
return ‘<div style=”width: 100%;” onclick=”modificaSelezionato();”></div>’;
}
},
{ text: ‘Id’, datafield: ‘Id’, width: ‘0%’, hidden: true },
{ text: ‘Owner’, datafield: ‘ownerLead’ },
{ text: ‘Nome’, datafield: ‘nome’ },
{ text: ‘Cognome’, datafield: ‘cognome’ },
{ text: ‘Azienda’, datafield: ‘azienda’ },
{ text: ‘Referente’, datafield: ‘referente’ },
{ text: ‘Cellulare’, datafield: ‘mobile’ },
{ text: ‘Telefono’, datafield: ‘telefono’ },
{ text: ‘Email’, datafield: ’email’ },
{ text: ‘DataLead’, datafield: ‘DataLead’, type: ‘date’, format: ‘dd/MM/yyyy’, filterable: false, sortable: false },
{ text: ‘StatoLead’, datafield: ‘statoLead’ }
],
ready: function () {
$(‘#jqxgrid’).jqxGrid({ pagesizeoptions: [’20’, ’50’, ‘100’, ‘200’] });
}
});
});All works fine but when i try to filter the column Cellulare i have “No data result”. The only column that not work is “Cellulare” and i don’t know why. I can see correctly the data of ‘Cellulare’ and the database structure is equal for ‘Mobile’ and for ‘Telefono’. For the column ‘Telefono’ all works fine.
What’s the problem?
Thanks to all
Hi robynho85,
I can’t see a problem in the code you provided.
I suggest checking again your database or create a simple fiddle reproducing your problem.Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/I analyzed the problem and only for this column if the first row is initialized(with any type of value) i have “No data result”. If the first row in my grid is NULL all works fine.
Do you know to explain me what it depends on?
Thanks
Hi robynho85,
As I said, I can’t see a problem in the code you provided.
I believe the problem is in your database, so check it again or create a simple fiddle reproducing it.
Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.