jQuery UI Widgets › Forums › Grid › filter row search as "equal" instead of "contains"
Tagged: equal, filtercondition, filtering, grid, jqxgrid
This topic contains 3 replies, has 2 voices, and was last updated by Dimitar 13 years, 3 months ago.
-
Author
-
Team –
i have the filter row enabled. if i type “A” it returns rows having both “A” and “BAB”.
i want it to return only “A”.in other words, search defaults to “contains” type. i want “equals” type.
i can achieve this through the toolbar method, but i am interested in achieving it through the filter row as its more simple.Hello userdch,
If we take the Filter Row as an example, you just have to change the filtercondition of the Name column from ‘starts_with’ to ‘equal’:
columns: [ { text: 'Name', columntype: 'textbox', filtertype: 'textbox', filtercondition: 'equal', datafield: 'name', width: 115 }, { text: 'Product', filtertype: 'checkedlist', datafield: 'productname', width: 220 }, { text: 'Available', datafield: 'available', columntype: 'checkbox', filtertype: 'bool', width: 67 }, { text: 'Ship Date', datafield: 'date', filtertype: 'date', width: 210, cellsalign: 'right', cellsformat: 'd' }, { text: 'Qty.', datafield: 'quantity', filtertype: 'number', cellsalign: 'right' } ]Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/thank you very much. this really helped.
by default, a filter text box shows up on top of all columns.
is there a way to selectively place filter text box only on some columns ?
there is a “showfiltermenuitems” option but the documentation is not clear what exactly it does.Hi userdch,
To remove the filter text box only on some colums, set the column property filterable to false, i.e.:
{ text: 'Name', columntype: 'textbox', filterable: false, datafield: 'name', width: 115 },Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.