jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Problem With updatefilterpanel in Grid
Tagged: grid, updatefilterpanel
This topic contains 2 replies, has 2 voices, and was last updated by Sibeesh Venu 9 years, 6 months ago.
-
Author
-
Suppose I have a grid as follows,
$("#jqxgrid").jqxGrid( { source: data, columns: [{ "text": "Area Code", "dataField": "AreaCode", "cellsalign": "left", "cellsformat": "d" }, { "text": "Revenue", "dataField": "Revenue", "cellsalign": "right", "cellsformat": "c2" }], pageable: true, filterable: true, sortable: true, rendered: function () { var localizationobj = {}; filterstringcomparisonoperators = ['equal', 'empty', 'not empty', 'contains', 'does not contain', 'starts with', 'ends with', 'null']; filternumericcomparisonoperators = ['equal', 'not equal', 'less than', 'less than or equal', 'greater than', 'greater than or equal', 'null', 'not null']; filterdatecomparisonoperators = ['equal', 'not equal', 'less than', 'less than or equal', 'greater than', 'greater than or equal', 'null', 'not null']; filterbooleancomparisonoperators = ['equal', 'not equal']; localizationobj.filterstringcomparisonoperators = filterstringcomparisonoperators; localizationobj.filternumericcomparisonoperators = filternumericcomparisonoperators; localizationobj.filterdatecomparisonoperators = filterdatecomparisonoperators; localizationobj.filterbooleancomparisonoperators = filterbooleancomparisonoperators; // apply localization. $("#jqxgrid").jqxGrid('localizestrings', localizationobj); }, updatefilterconditions: function (type, defaultconditions) { var stringcomparisonoperators = ['EQUAL', 'EMPTY', 'NOT_EMPTY', 'CONTAINS', 'DOES_NOT_CONTAIN', 'STARTS_WITH', 'ENDS_WITH', 'NULL']; var numericcomparisonoperators = ['EQUAL', 'NOT_EQUAL', 'LESS_THAN', 'LESS_THAN_OR_EQUAL', 'GREATER_THAN', 'GREATER_THAN_OR_EQUAL', 'NULL', 'NOT_NULL']; var datecomparisonoperators = ['EQUAL', 'NOT_EQUAL', 'LESS_THAN', 'LESS_THAN_OR_EQUAL', 'GREATER_THAN', 'GREATER_THAN_OR_EQUAL', 'NULL', 'NOT_NULL']; var booleancomparisonoperators = ['EQUAL', 'NOT_EQUAL']; switch (type) { case 'stringfilter': return stringcomparisonoperators; case 'numericfilter': return numericcomparisonoperators; case 'datefilter': return datecomparisonoperators; case 'booleanfilter': return booleancomparisonoperators; } }, updatefilterpanel: function (filtertypedropdown1, filtertypedropdown2, filteroperatordropdown, filterinputfield1, filterinputfield2, filterbutton, clearbutton, columnfilter, filtertype, filterconditions) { var index1 = 0; var index2 = 0; filtertypedropdown1.jqxDropDownList({ autoDropDownHeight: true, selectedIndex: index1 }); filtertypedropdown2.jqxDropDownList({ autoDropDownHeight: true, selectedIndex: index2 }); } });
My requirement was showing equal as the default condition in filter, So I used updatefilterpanel. But now I have selected filter ‘Contains’ and apply filter. When I click on the applied filter and check, the condition is showing ‘Equal’ Instead of ‘Contains’ . I wanted the Equal conditions to be showed if there is no filters applied to that column. Any suggestions? Thanks in advance.
Kindest Regards
Sibeesh VenuHi Sibeesh Venu,
You’re posting the same topic for 3rd time. Please, see our answers to the previous topics.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Sorry for that, please reply here http://www.jqwidgets.com/community/topic/order-jqx-grid-jqwidget-filter-conditions/
-
AuthorPosts
You must be logged in to reply to this topic.