Search
11329 results 2151-2160
Forum
- 26th Feb 2013Filter, but not searchHi all, I'm wondering if it is possible to exclude a column from search, but to still allow it to be individually filtered (for example using a select or text box). I'm using the standard global search, but have a select using (on change) the fnFilter() method which stops working when setting bSearchable to false on the column in question.
- 25th Feb 2013Without alert() filter dropdownlist menu not feeling.Hello All, I am working on ASP.Net MVC and JQuery. And using JQuery DataTable. But in one of the JQuery script, I need to add alert() function then only the script get run other wise script not get run. I am not getting actual problem and have googled a lot still didn't get solution so please help me for the same. This is my code: [code] $("#dvddl div").each(function (i) { this.innerHTML = this.innerHTML + fnCreateSelect(oTable.fnGetColumnData(i)); alert(i); /THIS IS THAT ALERT WHICH WE NEED TO ADD IN THIS CODE OTHER WISE (select)CONTROLS NOT GET LOAD/ $('select', this).change(function () { oTable.fnFilter($(this).val(), i); }); }); [/code]
- 14th Feb 2013Double sorting using an alphabetic filter barI have dataTables sorting by column, now I want to add an alphabetic bar across the top of the table (a, b, c, d....) so that when the user clicks on a column to sort it, they can also click on one of the letters to bring up values in that column that start with that letter. So, if they have column 1 sorted, then the click "A", everything comes up where the values in column 1 start with the letter A. Any ideas? Thanks in advance!
- 31st Dec 2012DataTable ignore Hidden Rows while sorting and filterIs there anyway for datatable plugin to ignore hidden rows so the alternate row color doesn't get mess up and the sInfo will display the right number of rows. When i hide a row the sInfo information of total rows does not match the number of visible rows. Same problem with filter/search. Thanks. P.S. I can not remove rows.
- 11th Nov 2012How to ignore the A HREF tag from inside a column when populating the filter dropdown menuHello guys, I've implemented this example: http://datatables.net/release-datatables/examples/api/multi_filter_select.html Inside a table of mine which contains 8 columns. Everything is great excepting for the fact that inside the 1st column I have a text string linked to an .html page. When populating the dropdown menu that is displayed under that 1st column I see: TextString">TextString Inside that column I have: TextString The only thing that I've changed is: $(document).ready(function() { /* Initialise the DataTable */ var oTable = $('#example').dataTable( { "oLanguage": { "sSearch": "Search all columns:" } } ); Changed into: $(document).ready(function() { /* Initialise the DataTable */ var oTable = $('#example').dataTable( { "sPaginationType": "full_numbers", "iDisplayLength": 25, "oLanguage": { "sSearch": "Search all columns:" } } ); I've tried to add also: "aoColumns": [ { "sType": "html" }, { "sType": "string" }, { "sType": "string" }, { "sType": "string" }, { "sType": "string" }, { "sType": "string" }, { "sType": "string" }, { "sType": "string" } ], just after the 'iDisplayLength' parameter, but this didn't make any difference. What's wrong? Thanks, Mihai
- 8th Nov 2012datatable filter with jquery ui sliderI use data table plugin for my grid view it works fine for searching,sorting but i want searching like in the following link with jquery UI slider http://jiren.github.com/filter.js/filterjs.html and searching with check box but not getting idea how to do it when i change something in my code the slider gets disapear help me to get out of it please provide any working code here is my .aspx jquery code jQuery(document).ready(function($) { $(function(){ var options = { range: true, min: 500, max: 1000, values: [500, 1000], slide: function(event, ui) { min = ui.values[0], max = ui.values[1]; $("#amount").val("Rs." + min + " - Rs." + max); }, stop: function(event, ui) {//This event is triggered when the user stops sliding. oTable.fnDraw(); } } $("#slider-range").slider(options); min = $("#slider-range").slider("values", 0); max = $("#slider-range").slider("values", 1); $("#amount").val("Rs." + min + " - Rs." + max); }); $('#').dataTable({ "bJQueryUI": true, "bPaginate": false, "bLengthChange": false, "bFilter": true, "bSort": true, "bAutoWidth": false }); });
- 1st Nov 2012Combobox filterHi, I use this jQuery plugin to make a list of all students on a school, this is a huge list. I was wondering if it would be possible to add a combobox containing all the values of the group collumn. Then if you select a group in that combobox you only get the students from this group. Is there a feature in Datatables that can be used to achieve this? Thank you, Jerodev.
- 18th Sep 2012Search that doesn't filterIs it possible to have the search highlight the the first row that matches instead of only showing the rows that match?
- 17th Aug 2012filter by column and scrolling not working when search elemensts are put in to thead node.Hi I am putting searchable text box above table body into thead node instead of tfoot. its working fine. when i add scrolling code datatable get messed up. please help.
- 8th Aug 2012multi filter select problemhi alan, i tried to add selectbox for every th. this code worked but it just took variables on current page. i think its cause i used it in fnInitComplete. but if i moved it out from my datatables options. it just showed me only one null option for every selectboxes (function($) { /* * Function: fnGetColumnData * Purpose: Return an array of table values from a particular column. * Returns: array string: 1d data array * Inputs: object:oSettings - dataTable settings object. This is always the last argument past to the function * int:iColumn - the id of the column to extract the data from * bool:bUnique - optional - if set to false duplicated values are not filtered out * bool:bFiltered - optional - if set to false all the table data is used (not only the filtered) * bool:bIgnoreEmpty - optional - if set to false empty values are not filtered from the result array * Author: Benedikt Forchhammer <b.forchhammer /AT\ mind2.de> */ $.fn.dataTableExt.oApi.fnGetColumnData = function ( oSettings, iColumn, bUnique, bFiltered, bIgnoreEmpty ) { // check that we have a column id if ( typeof iColumn == "undefined" ) return new Array(); // by default we only wany unique data if ( typeof bUnique == "undefined" ) bUnique = true; // by default we do want to only look at filtered data if ( typeof bFiltered == "undefined" ) bFiltered = true; // by default we do not wany to include empty values if ( typeof bIgnoreEmpty == "undefined" ) bIgnoreEmpty = true; // list of rows which we're going to loop through var aiRows; // use only filtered rows if (bFiltered == true) aiRows = oSettings.aiDisplay; // use all rows else aiRows = oSettings.aiDisplayMaster; // all row numbers // set up data array var asResultData = new Array(); for (var i=0,c=aiRows.length; i<c; i++) { iRow = aiRows[i]; var aData = this.fnGetData(iRow); var sValue = aData[iColumn]; // ignore empty values? if (bIgnoreEmpty == true && sValue.length == 0) continue; // ignore unique values? else if (bUnique == true && jQuery.inArray(sValue, asResultData) > -1) continue; // else push the value onto the result data array else asResultData.push(sValue); } return asResultData; }}(jQuery)); function fnCreateSelect( aData ) { var r='', i, iLen=aData.length; for ( i=0 ; i<iLen ; i++ ) { r += ''+aData[i]+''; } return r+''; } $(document).ready(function() { var oTable=$('#example').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "siparisler_serversidesorter.php", "fnInitComplete": function ( sSource, aoData, fnCallback ) { $("tfoot th").each( function ( i ) { console.log( oTable.fnGetColumnData(i)); this.innerHTML = fnCreateSelect( oTable.fnGetColumnData(i) ); $('select', this).change( function () { oTable.fnFilter( $(this).val(), i ); } ); } ); } } ); });