jQWidgets Forums
Forum Replies Created
-
Author
-
February 13, 2015 at 7:45 pm in reply to: Remove sort without sending data Remove sort without sending data #67103
What I mean is that I want to add indicator that column is sorted, data comes back from server already presorted.
So there is no way to clear one filter and leave others active?
I basically need to remove only one filter, lets say I applied 2 filters and I want to remove one of them using api.
http://bondsdemo.trademorebonds.com/grid-filter.html
Enter ‘an’ to ‘name’ col and 5 into ‘qty’ column, then ‘remove filter’. it removes ‘name’ filter and clears value from ‘qty’
http://localhost:1677/grid-filterrefresh.html << with ‘refresh’
‘refreshfilterrow’ not working.
Here taken from filter sample:
<script type="text/javascript"> $(document).ready(function () { var theme = getDemoTheme(); var data = generatedata(500); var source = { localdata: data, datafields: [ { name: 'name', type: 'string' }, { name: 'productname', type: 'string' }, { name: 'available', type: 'bool' }, { name: 'date', type: 'date' }, { name: 'quantity', type: 'number' } ], datatype: "array" }; var dataAdapter = new $.jqx.dataAdapter(source); $("#jqxgrid").jqxGrid( { width: 685, source: dataAdapter, showfilterrow: true, filterable: true, theme: theme, selectionmode: 'multiplecellsextended', columns: [ { text: 'Name', columntype: 'textbox', filtertype: 'textbox', filtercondition: 'starts_with', 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' } ] }); $('#clearfilteringbutton').jqxButton({ height: 25, theme: theme }); $('#clearfilteringbutton').click(function () { $('#jqxgrid').jqxGrid('removefilter', "name", true); }); }); </script>
Ok.. unfortunately doing that mouse over on filter icon is complicated for user base
Thank you for reply.
Nikita.basically i want similar filter condition selection like there is for numeric fields. for some reason for text there is no dropdown.
July 26, 2013 at 2:35 pm in reply to: Grid Date format for filter Grid Date format for filter #25801hmm
what is the difference between formatData and processData?
I actually used processData to append more data to whats being send to server.
July 19, 2013 at 1:24 pm in reply to: Preselecting items in a checkedlist filter Preselecting items in a checkedlist filter #25499So is it a bug?
July 18, 2013 at 7:42 pm in reply to: Preselecting items in a checkedlist filter Preselecting items in a checkedlist filter #25445Nevermind comment about “virtualmode”.
Seems like your sample only ticks one value in dropdown.
Thanks.
Nikita.July 18, 2013 at 7:37 pm in reply to: Preselecting items in a checkedlist filter Preselecting items in a checkedlist filter #25444Hi Dimitar,
Here’s slightly modified code, I added virtualmode and made it pageable.
Now issue is when you add custom filter, it “check” two fields – only one.
<!DOCTYPE html><html lang="en"><head> <link rel="stylesheet" href="/scripts/jqwidgets-2-9-3/styles/jqx.base.css" type="text/css" /> <link rel="stylesheet" href="/scripts/jqwidgets-2-9-3/styles/jqx.axeomblue.css" type="text/css" /> <script src="/scripts/jquery-1.10.1.min.js" type="text/javascript"></script> <script src="/scripts/jquery-ui.js" type="text/javascript"></script> <script type="text/javascript" src="/scripts/jqwidgets-2-9-3/jqx-all.js"></script> <script src="gettheme.js" type="text/javascript"></script> <script type="text/javascript" src="generatedata.js"></script> <script type="text/javascript"> $(document).ready(function () { var theme = getDemoTheme(); var data = generatedata(500); var source = { localdata: data, datafields: [ { name: 'name', type: 'string' }, { name: 'productname', type: 'string' }, { name: 'available', type: 'bool' }, { name: 'date', type: 'date' }, { name: 'quantity', type: 'number' } ], datatype: "array" }; var dataAdapter = new $.jqx.dataAdapter(source); $("#jqxgrid").jqxGrid( { width: 685, source: dataAdapter, showfilterrow: true, filterable: true, theme: theme, pageable: true, virtualmode: true, editable: true, pagesize: 50, rendergridrows: function(obj) { return obj.data; }, columns: [ { text: 'Name', columntype: 'textbox', filtertype: 'textbox', filtercondition: 'starts_with', 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' } ] }); $('#clearfilteringbutton').jqxButton({ height: 25, theme: theme }); $('#clearfilteringbutton').click(function () { $("#jqxgrid").jqxGrid('clearfilters'); }); var presetlogidfilter = function () { $('#jqxgrid').jqxGrid('clearfilters'); var fileids = ["Espresso con Panna", "Caramel Latte"]; // gets the file IDs from the other control. Strings like "000038010" if (fileids != null && fileids.length > 0) { var filtergroup = new $.jqx.filter(); var filter_or_operator = 1; var filtercondition = 'equal'; for (var i = 0; i < fileids.length; i++) { var filtervalue = fileids[i]; var filter1 = filtergroup.createfilter('stringfilter', filtervalue, filtercondition); // this pre-filters, but the check lists are empty and as soon as a user opens the selection drop down, the filter is lost filtergroup.addfilter(filter_or_operator, filter1); } // add the filters. $('#jqxgrid').jqxGrid('addfilter', 'productname', filtergroup); // apply the filters. $('#jqxgrid').jqxGrid('applyfilters'); }; }; $("#presetlogidfilterButton").click(function () { presetlogidfilter(); }); }); </script></head><body class='default'> <div id="jqxgrid"> </div> <input style="margin-top: 10px;" value="Remove Filter" id="clearfilteringbutton" type="button" /> <button id="presetlogidfilterButton"> Filter Product column</button></body></html>
i did a work around for filter, but it would be great for grid not to erase custom filter.
Thank you!1. is possible not to erase?
2. with version 2.8 i wasnt getting that error (i can setup two links with differetn versions).
but this seems to work:
i wrapped grid into another div ‘gridcontainer’
var grid1 = $(““);
$(“#jqxgridContainer”).empty();
$(“#jqxgridContainer”).append(grid1);3. item 2 fixes this one.
Perhaps I’m doing something wrong, after it’s loaded click “Query 2”
http://axeom.asyncbox.com/axeomquery
Also, getfilterinfo api still not working. Grid erases custom filter.
June 26, 2013 at 8:02 pm in reply to: Sort + Filter on grid returns error Sort + Filter on grid returns error #23944virtualmode must be true.
that fixed.
-
AuthorPosts