"); // label.text(1 + pageNumber * pageSize + "-" + Math.min(totalRecords, (pageNumber + 1) * pageSize) + ' of ' + totalRecords); label.text(number_format( 1+( (pageNumber-1) * pageSize )) + "-" + number_format(Math.min(totalRecords, (pageNumber ) * pageSize)) + ' of ' + number_format(totalRecords)); label.appendTo(element); self.label = label; // update buttons states. var handleStates = function (event, button, className, add) { button.on(event, function () { if (add == true) { button.find('div').addClass(className); } else button.find('div').removeClass(className); }); } return element; } $("#jqx-PartnerGrid").on('pagechanged', function () { var datainfo = $("#jqx-PartnerGrid").jqxGrid('getdatainformation'); var paginginfo = datainfo.paginginformation; //self.label.text(1 + pageNumber * pageSize + "-" + Math.min(totalRecords, (pageNumber + 1) * pageSize) + ' of ' + totalRecords); self.label.text( number_format(1+( (pageNumber-1) * pageSize )) + "-" + number_format(Math.min(totalRecords, (pageNumber ) * pageSize)) + ' of ' + number_format(totalRecords)); }); $("#jqx-PartnerGrid").jqxGrid({ source: dataAdapter, width: '100%', theme: '', sortable: true, altrows: true, columnsheight: 30, rowsheight: 30, columnsresize: true, columnsreorder: true, pageable: true, autoheight: false, pagesize: pageSize, filterable: true, showfilterrow: false, // autoshowfiltericon: false, pagerrenderer: pagerrenderer, autoshowcolumnsmenubutton:true , ready: function () { // custom sorting function $("#jqx-PartnerGrid").jqxGrid('sortby', htTrariffDatacodes.getItem(sortCol), sortOrder); var localizationObject = { // filterstringcomparisonoperators: ['contains', 'does not contain'], // // filter numeric comparison operators. // filternumericcomparisonoperators: ['less than', 'greater than'], // // filter date comparison operators. // filterdatecomparisonoperators: ['less than', 'greater than'], // // filter bool comparison operators. // filterbooleancomparisonoperators: ['equal', 'not equal'] } // $("#jqx-PartnerGrid").jqxGrid('localizestrings', localizationObject); }, updatefilterconditions: function (type, defaultconditions) { // var stringcomparisonoperators = ['CONTAINS', 'DOES_NOT_CONTAIN']; // var numericcomparisonoperators = ['LESS_THAN', 'GREATER_THAN']; // var datecomparisonoperators = ['LESS_THAN', 'GREATER_THAN']; // var booleancomparisonoperators = ['EQUAL', 'NOT_EQUAL']; // switch (type) { // case 'stringfilter': // return stringcomparisonoperators; // case 'numericfilter': // return numericcomparisonoperators; // case 'datefilter': // return datecomparisonoperators; // case 'booleanfilter': // return booleancomparisonoperators; // } }, columnmenuopening: function (menu, datafield, height) { var column = $("#jqx-PartnerGrid").jqxGrid('getcolumn', datafield); if (column.filtertype === "custom") { menu.height(200); //155 setTimeout(function () { menu.find('input').focus(); }, 25); } else menu.height(height); }, columns: [{ text: 'Reporter', dataField: 'Reporter', filtertype: 'custom', width: 90, cellsalign: 'left', createfilterpanel: function (datafield, filterPanel) { buildFilterPanel(filterPanel, datafield, false); }, align: 'center' }, { text: 'Year', dataField: 'Year', filtertype: 'custom', width:60, cellsalign: 'left', align: 'center', createfilterpanel: function (datafield, filterPanel) { buildFilterPanel(filterPanel, datafield, false); }, cellsformat: 'F2' }, { text: 'Partner', dataField: 'Partner', filtertype: 'custom', width: 80, cellsalign: 'left', createfilterpanel: function (datafield, filterPanel) { buildFilterPanel(filterPanel, datafield, false); }, align: 'center', cellsformat: 'F2' }, { text: 'Product', dataField: 'Product', filtertype: 'custom', width: 725, cellsalign: 'left', createfilterpanel: function (datafield, filterPanel) { //buildFilterPanel(filterPanel, datafield, false); }, align: 'center', cellsformat: 'F2' }, { text: 'MFN Tariff', dataField: 'MFNRate', filtertype: 'custom', width: 80, cellsalign: 'right', createfilterpanel: function (datafield, filterPanel) { buildFilterPanel(filterPanel, datafield, true); }, align: 'center', cellsformat: 'F2' }, { text: 'Applied Tariff', dataField: 'AppliedTariff', filtertype: 'custom', width:90, cellsalign: 'right', createfilterpanel: function (datafield, filterPanel) { buildFilterPanel(filterPanel, datafield, false); }, align: 'center', cellsformat: 'F2' }, { text: 'Total Tariff Lines', dataField: 'TotalTariffLines', filtertype: 'custom', cellsalign: 'center', width:120, cellsalign: 'right', createfilterpanel: function (datafield, filterPanel) { buildFilterPanel(filterPanel, datafield, false); }, align: 'center', cellsformat: 'F2' }, { text: 'Is Traded', dataField: 'IsTraded', filtertype: 'custom', cellsalign: 'center', width:90, cellsalign: 'center', createfilterpanel: function (datafield, filterPanel) { buildFilterPanel(filterPanel, datafield, false); }, align: 'center', cellsformat: 'F2' } /*, { text: 'RowNum', dataField: 'RowNum', filtertype: 'custom', cellsalign: 'center', width:70, cellsalign: 'right', createfilterpanel: function (datafield, filterPanel) { buildFilterPanel(filterPanel, datafield, false); }, align: 'center', cellsformat: 'F2' } */ ] }); //your code here }); $("#jqx-PartnerGrid").bind("bindingcomplete", function (event) { var filtergroup = new $.jqx.filter(); var filter_or_operator = 1; var filtercondition = 'contains'; var filter1 =""; //var filtercolumn=["Partner","ProductCode"]; for (index=0;filtercolumn[index];index++ ) { // console.log(filtervalue[index]+" "+filtercondition+" "+filtercolumn[index]+" "+filtercolumn); filter1 = filtergroup.createfilter('stringfilter', filtervalue[index], filtercondition); filtergroup.addfilter(filter_or_operator, filter1); $("#jqx-PartnerGrid").jqxGrid('addfilter', htTrariffDatacodes.getItem(filtercolumn[index]), filtergroup); } $("#jqx-PartnerGrid").jqxGrid('applyfilters'); }); 