Search
13884 results 2961-2970
Forum
- 22nd Apr 2022Invalid search options not to be restoredHi @pgerundt , SearchPanes uses the stateSaveParams event to add the SearchPanes data to the state object. This event listener is set after the one set in the datatables initialisation. I'd suggest that you set your listener after SearchPanes has initialised. You could set a listener inside the datatables initComplete option - at this point SearchPanes will have already set it's listener and yours should run after the options have been added. Thanks, Sandy
- 22nd Apr 2022Where clause in search panesYou can use a closure function for the options as well. That supports executing your own SQL-statement if you like: https://editor.datatables.net/manual/php/joins#Closure---custom-function Something like this could work (not tested). It uses the built-in Editor db-handler which is typically called $db. If you called it differently you would need to change that in the code below. Field::inst('returns.member','member') ->searchPaneOptions( function() use ($db) { $stmt = ('SELECT DISTINCT id AS `value`, member AS `label` FROM returns WHERE member = :ab_foods LIMIT 1'); $result = $db ->raw() ->bind(':ab_foods','ab foods') ->exec($stmt);` return $result->fetchAll(PDO::FETCH_ASSOC); }),
- 31st Mar 2022Search Builder - Auto Select ConditionHi @fiji885 , Just to let you know that we have implemented this and it will be available in the next SearchBuilder release which we hope will be in the next few weeks. Until then you can access the fix from the nightly builds. Until then, you can see it in action at this example. Thanks, Sandy
- 31st Mar 2022SearchBuilder: How to pre-populate search values inside SearchBuilder values dropdown menu?Hi @ECEGROUPE , Take a look a this example. There are a few changes required to the function I linked above as it is in typescript. The main addition to get this working is /*****************************************************************************************/ addOption("AlwaysPresent", "AlwaysPresent") /*****************************************************************************************/ Hope this helps, Sandy
- 27th Feb 2022Pagination & Search not workingThat is the XHR response. You will want to look at the request tab and the parameters sent in the request. Also note that draw: 0 is incorrect. This is a sequence number and Datatables starts with 1. 0 will not be sent nor expected by Datatables. See the server Side Processing docs for more details. This might be the issue you are seeing. Kevin
- 16th Feb 2022Fixed column together with search each columnOk. Thanks Allan.
- 28th Jan 2022Sorting of Search PanesHi Kevin! Thank you very much! Now it works! :D That was the last step to the right solution! Have a nice day - greetings from Brazil Hubert
- 20th Jan 2022Checkbox\Boolean search returns all data if search is blankHi Sandy, thank you for your reply, good to know it is possible. I'll give it a go and let you know how I get on. Chris
- 8th Jan 2022Datatables flitering and search button@kthorngren Perfect! It worked! Thanks!
- 7th Jan 2022How to change the background color of only search pane, not for the datatable?You would CSS, but have the selector inside the class dtsp-panesContainer as that's specific to the SearchPanes, Colin