jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqxGrid filter condition not working in jqxWindow
Tagged: jqxgrid, jqxgrid filtering, jqxwindow
This topic contains 7 replies, has 2 voices, and was last updated by kkute 9 years, 4 months ago.
-
Author
-
Hi Team,
i am opening a jqxWindow as popup on button click, inside which i have my jqxGrid when i try to apply the filter as “equal” it is not working in chrome browser, also i noted that IE and Firefox treats the column as string whereas the Chrome treats that column as Integer type because the filter conditions which i see are different in all 3 browsers(IE, Firefox) having same whereas chrome is showing different than this two.
please suggest..Hi kkute,
You probably missed something in the initialization of jqxGrid. I would suggest you to look at our Filtering demos and see where the gaps in your initialization code are. From your description, you most probably missed the datafields type initialization in the source object.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter Stoev,
Ohhh! yes i was missing the datafield initialization done it,
but after mentioning the datafield initialization filter condition “equal” works in IE but not in Chrome.
please suggest,also for reference i am posting the sample code snippet of my jqxGrid initialization, please suggest.
$(“#grid”).jqxGrid(
{
Height: 500,
Width: 500,
source: source,
filterable: true,
sortable: false,
pageable: false,
groupable: false,
autoheight: false,
autowidth: false,
columnsresize: true,
columnsreorder: false,
selectionmode: “singlecell”,
enabletooltips: true,
columns: [
{ text: ‘HPID’, datafield: ‘HPID’, width: 100, type: ‘string’ },
{ text: ‘Manufacturer’, datafield: ‘Manufacturer’, width: 100, type: ‘string’ },
{ text: ‘Material’, datafield: ‘Material’, width: 100, type: ‘string’ },
{ text: ‘MaterialSpec’, datafield: ‘MaterialSpec’, width: 100, type: ‘string’ },
{ text: ‘ShortDesc’, datafield: ‘ShortDesc’, width: 80, type: ‘string’ },
{ text: ‘LongDesc’, datafield: ‘LongDesc’, width: 100, type: ‘string’ },
{ text: ‘NominalSize’, datafield: ‘NominalSize’, width: 95, type: ‘string’ },
{ text: ‘HPHPart#’, datafield: ‘HPHPart#’, width: 100, type: ‘string’ },
{ text: ‘ManufUPC’, datafield: ‘ManufUPC’, width: 100, type: ‘string’ }
],
});Thanks
Hi kkute,
columns are not created correctly. “type” should be in the source object. source should be dataAdapter. Again, look at the demos, please. autowidth – what’s this – we don’t have such property.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comhello peter,
Sorry for that code snippet, yes i saw the demos and now i have changed my code according to that.
but still the problem persist, filter condition “equal” works only in IE and that too for data like integer numbers 100,200…but if i have 10A or 10-C as my data then it doesn’t work in IE too, and in chrome it does not workThanks
Hi kkute,
This is not browser specific so you must be missing something in your initialization as you are missing in the provided code snippet. Please, provide jsfiddle.net sample and we will tell you what’s wrong in your code.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comhello peter,
i will prepare jsfiddle.net sample for you in the mean time have a look at my code snippet.
function ServiceSucceededGetData(result) {
try {var data;
if (result)
data = $.parseJSON(result);
else {
return;
}var source =
{
localdata: data,
datatype: “json”,datafields: [
{ name: ‘HPID’, map: ‘HPID’, type: ‘string’ },
{ name: ‘Manufacturer’, map: ‘Manufacturer’, type: ‘string’ },
{ name: ‘Material’, map: ‘Material’, type: ‘string’ },
{ name: ‘MaterialSpec’, map: ‘MaterialSpec’, type: ‘string’ },
{ name: ‘ShortDesc’, map: ‘ShortDesc’, type: ‘string’ },
{ name: ‘LongDesc’, map: ‘LongDesc’, type: ‘string’ },
{ name: ‘HPHPart#’, map: ‘HPHPart#’, type: ‘string’ },
{ name: ‘ManufUPC’, map: ‘ManufUPC’, type: ‘string’ }
]
};$(“#gridHP”).jqxGrid(
{
Height: 500,
Width: 500,
source: source,
filterable: true,
sortable: false,
pageable: false,
groupable: false,
autoheight: false,
columnsresize: true,
columnsreorder: false,
selectionmode: “singlecell”,
enabletooltips: true,
columns: [
{ text: ‘HPID’, datafield: ‘HPID’, width: 100, },
{ text: ‘Manufacturer’, datafield: ‘Manufacturer’, width: 100, },
{ text: ‘Material’, datafield: ‘Material’, width: 100, },
{ text: ‘MaterialSpec’, datafield: ‘MaterialSpec’, width: 100, },
{ text: ‘ShortDesc’, datafield: ‘ShortDesc’, width: 80, },
{ text: ‘LongDesc’, datafield: ‘LongDesc’, width: 100, },
{ text: ‘NominalSize’, datafield: ‘NominalSize’, width: 95, },
{ text: ‘HPHPart#’, datafield: ‘HPHPart#’, width: 100, },
{ text: ‘ManufUPC’, datafield: ‘ManufUPC’, width: 100, }
],
});
} catch (e) {
alert(e);
}
}if any thing is wrong in my above code snippet please let me know.
ThanksHello Peter,
Sorry! Sorry! Sorry! from my side,
well the problem was, i was directly consuming data which was coming from service i did not QuickWatch it and problem was in Data coming from Db which was having spaces both before and after of it, as soon as our DB admin changed it and problem resolved.
i have checked it in all 3 browsers IE,Chrome and Firefox its working fine
Thanks
-
AuthorPosts
You must be logged in to reply to this topic.