How to search selected colums only?

How to search selected colums only?

zoltanzoltan Posts: 1Questions: 0Answers: 0
edited October 2009 in General
Hi group,
i would like the DataTable search input to lookup selected columns only and not all of them. i see there is a way to add a search input for each column, but it makes UI a bit complex. Please help!

Replies

  • netmannetman Posts: 15Questions: 0Answers: 0
    edited October 2009
    May i suggest you to read -> http://datatables.net/usage/columns
    Take a look at ' bSearchable':
    Let me give you a small example with a piece of code (I'm a practical guy):
    So, i'm going to use part of the code that Alan uses in his examples. Let us assume zoltan, that you need ONLY column 3 (Platform) to be searchable.

    [code]
    $(document).ready(function() {
    $('#example').dataTable( {
    "aoColumns": [
    { "sTitle": "Rendering Engine" ,
    "bSearchable": false },
    { "sTitle": "Browser",
    "bSearchable": false },
    { "sTitle": "Platform",
    "bSearchable": true },
    { "sTitle": "Engine Version",
    "bSearchable": false },
    { "sTitle": "CSS Grade",
    "bSearchable": false },
    ] } );
    } );
    [/code]
    I hope that will help you.

    Regards
    Sreve
  • abhinavm_123abhinavm_123 Posts: 3Questions: 0Answers: 0
    I am new to this...so just wanted to confirm that will i need to write a back end code to search the data in a particular column.....say in java or .net ......
This discussion has been closed.