Search
11455 results 2161-2170
Forum
- 27th Feb 2014Server Side, Know if filter throws the ajax call.Is it possible to know when the ajax call comes to the server if the call is thrown by pagination, filtering or sorting?
- 31st Oct 2013Filter Highlighting - Filter &Hi, im using this code from this Forumpost to highlight the filtered data. which means if i type "as" it highlights all "as" in the table. works fine so far. but if i search for "nb" or "am". the script makes also the "&" and " " visible and higlighted. how can i modify the regex or something else so it ignores these expressions? Because in the table i have things like "Multi & Media" which the script does to: "Multi & Media if i type in "am" http://live.datatables.net/ukapoc/10 <-- in this case he don't finds the amp when tiping "am"... but he shows & if i search for &... i dont get it...its the same code as mine O.o Here is the fiddle, but i don't know how to make it complete work :/ http://jsfiddle.net/exk9h/1/ [code] // HIGHLIGHT FCT jQuery.fn.dataTableExt.oApi.fnSearchHighlighting = function(oSettings) { // Initialize regex cache oSettings.oPreviousSearch.oSearchCaches = {}; oSettings.oApi._fnCallbackReg( oSettings, 'aoRowCallback', function( nRow, aData, iDisplayIndex, iDisplayIndexFull) { // Initialize search string array var searchStrings = []; var oApi = this.oApi; var cache = oSettings.oPreviousSearch.oSearchCaches; // Global search string // If there is a global search string, add it to the search string array if (oSettings.oPreviousSearch.sSearch) { searchStrings.push(oSettings.oPreviousSearch.sSearch); } // Individual column search option object // If there are individual column search strings, add them to the search string array if ((oSettings.aoPreSearchCols) && (oSettings.aoPreSearchCols.length > 0)) { for (var i in oSettings.aoPreSearchCols) { if (oSettings.aoPreSearchCols[i].sSearch) { searchStrings.push(oSettings.aoPreSearchCols[i].sSearch); } } } // Create the regex built from one or more search string and cache as necessary if (searchStrings.length > 0) { var sSregex = searchStrings.join("|"); if (!cache[sSregex]) { var regRules = "(" , regRulesSplit = sSregex.split(' '); regRules += "("+ sSregex +")"; for(var i=0; i<regRulesSplit.length; i++) { regRules += "|("+ regRulesSplit[i] +")"; } regRules += ")"; // This regex will avoid in HTML matches cache[sSregex] = new RegExp(regRules+"(?!([^<]+)?>)", 'ig'); } var regex = cache[sSregex]; } // Loop through the rows/fields for matches jQuery('td', nRow).each( function(i) { // Take into account that ColVis may be in use var j = oApi._fnVisibleToColumnIndex( oSettings,i); // Only try to highlight if the cell is not empty or null if (aData[j]) { // If there is a search string try to match if ((typeof sSregex !== 'undefined') && (sSregex)) { this.innerHTML = aData[j].replace( regex, function(matched) { return "<span class='filterMatches'>"+matched+"</span>"; }); } // Otherwise reset to a clean string else { this.innerHTML = aData[j]; } } }); return nRow; }, 'row-highlight'); return this; }; [/code]
- 24th Oct 2013bStateSave:true and filter: date-rangeHi, not work bStateSave with date-range. How to fix it?
- 23rd Oct 2013How does one filter out a single value and still see all others?I'd like to apply filtering to the column in
- 9th Oct 2013FixedColumns and Filtersides, and also have filters on the columns (on
- 24th Sep 2013Filter Table By Past Number of Days (Past 7 Days, Past 15 Days, Past 30 Days)approach the problem of filtering a data table given
- 12th Sep 2013indivisual column filter in datatables/* Define two custom functions (asc and desc) for string sorting */ $(document).ready(function() { oTable = $('#listing').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "master_distributor/productsList.php", "aoColumns": [ { "mData": "product_name" }, {"mData": "product_id"}, { "mData": "parent_id","sClass": "txtCenter" }, { "mData": "action",'bSortable': false,"sClass": "txtCenter" } ], }).columnFilter({ aoColumns: [ { type: "text"}, { type: "text" }, { type: "text" }, null ] }); } ); In above i want to add action as a column in my datatable. but it is not working. Here action is the json resoponse from my ajax page
- 31st Aug 2013multifiletersearch not working while using colvis and multi filter search togetherHi Allan, I am using colvis and multi search together, but it has some issue though.. Cases: 1. If I uncheck 'Rendering Engine', and use multi-search for Engine Version (e.g. with data data 6 or 7), it wont give any data. 2. for multi-serach for CSS grade, it wont search at all I've created jsfiddle. Please hav a look... http://jsfiddle.net/AmsJy/10/ Great Thanks....Cheers !!
- 29th Aug 2013Filter only visible datatables in fnFilterAllHi guy's first of all great work thanks for this... In my web page am using more data tables in a page with tabs, I Want search one search for all data tables in page... So i used fnFilter all api... its reloved my problem, but.. when i am search it searches all tables in all tabs.. i need to search only visible tables on a page (current tab).. eg: i have 3 tables in each tab.. all are having same class for data table. and also each tab tables contains another class by tab name.. if am using [code] oTable.fnFilterAll(this.value); [/code] it searches all tables in all tabs... using this [code] var tables = $.fn.dataTable.fnTables(true); [/code] i can get the tables i want.. that means currently visible tables. but i don't know how to use this results in fnFilterAll method help me to resolve this... thanks
- 15th Jul 2013how to change individual column filter text box sizeusing datatable individual column filtering plugin,here am adding date-range