Comments

HTML Table Filter Generator is no longer maintained, it is now replaced by the TableFilter project. Don't hesitate to check the demos out in their new location along with exhaustive documentation in the project's WIKI.

Comments closed

As some of you may know, I have been providing free support for this code since 2006 and I have been doing it with great pleasure for all this time. I always tried to reply to every question and keep the open source spirit alive. I think many developers appreciated it as they freely contributed to improve this code with amazing features and ideas. I would like to thank all those who supported this project with donations and with development efforts!
Don't take me wrong, this project will continue to evolve as there is always room for improvements and new features and will remain under an open source license ;-)
I simply have less and less time to dedicate to free support, therefore, from now on, you can contact me via the Premium Support Request form.

Thanks for your understanding,
Max

 

1 . 2012-10-04 12:40:28

Hemant wrote:

Table filter is not working on IE9 but when I run on Firefox is working fine... I get error on IE9  is  "Microsoft JScript runtime error: Unable to get value of the property 'rows': object is null or undefined" in this line

"var ntrs = this.tbl.rows.length.

Please help me on this issue..

Email : hemanta DOT 52 AT gmail DOT com


3 Replies

1 . 2012-10-07 09:54:08

Max wrote:

Hi Hemant,
I didn't receive any support request from you. Please resubmit it again.
Cheers

Email :


2 . 2012-10-05 08:58:58

Hemant wrote:

Hello Max,

In this demo wesite is working fine..Already I have submitted Support request..

 

Email : hemanta DOT 52 AT gmail DOT com


3 . 2012-10-05 02:09:03

Max wrote:

Hi Hemant,
Do you have the same error on the demos of this website?

Please submit a Support Request for this.

Email :


Top of page

2 . 2012-10-03 19:19:31

Renember paging page wrote:

Hi,

I use this script in a webshop for the articlepages.

The paging function workt fine only there is something i like to fix.

When you click on a sertain row lets say in the second page, it opens a new webpage.

As you go back to the page with the table is doesnt renember on wich page you where.

 

Is there a function for?

Email : david AT alexwel DOT nl


2 Replies

1 . 2012-10-05 02:06:21

Max wrote:

Hi David,
The option to remember the page number is remember_page_number and it appears twice in your config object but this shouldnt be a problem. Also remove the last ',' :
...
custom_slc_options:{
...
},
};
This is a syntax error that IE does not appreciate that much.

Email :


2 . 2012-10-03 19:28:54

David wrote:

This is my code

 

 <script language="javascript" type="text/javascript">

//<![CDATA[

var artikel_Props = {

   sort: true,

base_path: 'templates/TableFilter/',

filters_row_index: 1,  

    headers_row_index: 0, 

  

    remember_page_number: true,  

 

col_0: "none",

col_1: "none",

col_2: "select",

col_3: "select",

col_4: "select",

remember_page_number: true,

remember_grid_values: true, 

help_instructions: false,

paging: true,

paging_target_id: 'paging_control',

paging_length: 10,

enable_icons: false,

btn_reset: true,

btn_reset_target_id: 'reset',

btn_reset: true,

btn_reset_text: "Reset filter",            sort_select: true,            display_all_text:

"",

       custom_slc_options: {  

            cols:[4],  

            texts: [['0 - 5','5 - 25','25 - 50','50 - 75','75 - 100','100 - 10000']],  

            values: [  

                        ['>0 && <=5','>5 && <=25','>25 && <=50','>50 && <=75','>75 && <=100','>100 && <=10000']  

                    ],  

            sorts: [false]  

        },  

 

};

 

var tf = setFilterGrid("artikel",artikel_Props);

 

 

 

 

//]]>

</script>

Email : david AT alexwel DOT nl


Top of page

3 . 2012-09-12 17:44:41

remember_grid_values remembers across all tables wrote:

HI,

I am using your script on a number of tables inside my application. When i enable 'remember_grid_values:true', all the grids(across the various pages) remember this value. How can i limit the 'remember' feature to only the particular table on a page? I also notice that when the page loads for the first time, random values are present in certain filter fields when remember_grid_values is turned on. Anything i can do about this? I also downloaded the most recent script

Email : derrylvarghese AT gmail DOT com


2 Replies

1 . 2012-09-17 13:39:53

DGV wrote:

Ah Thanks! That worked!

Email : derrylvarghese AT gmail DOT com


2 . 2012-09-14 01:57:42

Max wrote:

Hi,

Thanks for pointing this out :), what I suggest to do is to change the id attribute of the table element accross the pages. From what I understand it seems your tables have the same id and since the cookie name is composed of 'tf_flts' + tableId, the cookie name is unfortunately reapplied to the tables living in the pages of your application.
I will try to correct this weird behaviour in the next release, hopefully.

Cheers

Email :


Top of page

4 . 2012-09-11 17:14:10

David wrote:

Is it posible to change  "show all" with a selectbox in a diferent name for each collum?

Email : david AT alexwel DOT nl


1 Reply

1 . 2012-09-12 10:37:59

Max wrote:

It may be possible with some little hack I guess. If you are interested place a Support Request

Cheers

Email :


Top of page

5 . 2012-08-31 15:58:24

Evgen wrote:

hi again
i asked before about date rane in pop up

i am trying to use script based on jquery plugin    

<script type="text/javascript" src="date.js"></script>
<script type="text/javascript" src="daterangepicker.jQuery.js"></script>
<script type="text/javascript">    
        $(function(){
              $('input').daterangepicker({
                dateFormat: 'yy/mm/dd',
                rangeSplitter: '&& <=',
                datepickerOptions: {
                     changeMonth: true,
                     changeYear: true,
                     minDate: new Date("01/01/2012") //Account created date
                },            });         });
</script>

i use it for writing  such text in input ">2012/08/24 && <=2012/08/31"

then i push button "filter"  and it work

<input id="inpSingleSearch" type="text" onkeypress="var key = event.charCode || event.keyCode || event.which; if(key==13){ tf.singleFilterSearch( this.value ); }" />
<button onclick="tf.singleFilterSearch( tf.singleFlt.value );">Filter</button>
<button onclick="tf.ClearFilters();">Clear</button>

but i need not single seach but one more parametr

how i must to change "onclick="tf.singleFilterSearch( tf.singleFlt.value );" and this function for second parametr if i have two "input" ?

Email : iven01 AT gmail DOT com


1 Reply

1 . 2012-09-10 05:49:53

Max wrote:

Hi,
I will post a demo whenever I have some time.
Cheers

Email :


Top of page

6 . 2012-08-24 13:36:25

Olivier Duhamel wrote:

Hi everyone, salut Max

I am having trouble implementing Remember_page_number

This is a table showing thumbnail images on four columns (and many rows, 5 rows per page). everything works perfectly well.

BUT, when clicking on one image, I load another page to view a larger file. When returing to the table, using either the browser back command or history.go(-1)  the browser reloads my table, remembers the rows that was clicked, but not the page. It always goes back to the first page. (same behaviour on IE, Chrome, Firefox, Safari) 

I have tried many things and looked at many samples and demos but still not sure of what I am doing wrong:

<script language="javascript" type="text/javascript">
//<![CDATA[
var table3Filters = {
paging: true,
paging_length: 5,
remember_page_number: true,

btn_reset: true,
btn_reset_text: "Clear all",
highlight_keywords: true,
on_keyup: true,
on_keyup_delay: 900,
single_search_filter: true,
};
var tf03 = setFilterGrid("classes",1,table3Filters)
//]]>
</script>

Any help much appreciated,

 

Cheers,

Olivier

Email : olivier AT duhamel DOT bz


1 Reply

1 . 2012-08-25 02:52:00

Max wrote:

Salut Olivier,
I have just tried with this demo: http://tablefilter.free.fr/datademo2.htm, I selected a page, then I browsed on an another location and came back by using the back button and the page was shown again.
Have you tried to clean your cookies and try again? Sometimes the cookie value makes reference to a page that no longer exists.
What version do you use? Are you importing tablefilter_all.js or tablefilter.js in your page?

Please submit a Support Request for this.

Cheers

Email :


Top of page

7 . 2012-08-22 13:14:41

Jacques wrote:

A new problem, when i set remember_grid_values: true, i've got no row i don't find where is the problem.

This is my code

    var t11_Props = {
                    base_path: '<?php echo URL_JAVASCRIPT; ?>/TableFilter/',
                    fixed_headers: true,
                    filters_row_index: 1,
                    filters_cell_tag: 'th',
                    grid: true ,
                    paging: true, 
                    alternate_rows: true,
                    rows_counter: true, 
                    tbody_height: 50,
                    input_watermark:"Filtre ...",
                    rows_counter_text: "NB. lignes : ", 
                    paging_length: 25 , 
                    col_0:'none',col_6: 'select',col_7: 'select',col_8: 'select',col_9: 'select',col_10: 'select',col_11: 'select',col_12: 'none',col_13: 'none',col_14: 'none',
                    sort: true,
                    help_instructions:false,
                    display_all_text: 'Tous',
remember_page_number: true,remember_grid_values: true
                }; 
    var t11 = setFilterGrid( "t1",t11_Props ); 

Email :


1 Reply

1 . 2012-08-23 06:54:46

Max wrote:

Jacques,

Please submit a Support Request for this.

Thanks

Email :


Top of page

8 . 2012-08-22 08:02:58

Jacques wrote:

Nice work thank for it.

I want to know if it's possible to add a text after operation in a cell.

I look at examples and the documentation and i don't find a solution.

I make an operation and i want to add " €" after or " days" but i don't know how to do that if you got and example for me thanks a lot.

Email :


3 Replies

1 . 2012-08-23 08:19:46

Jacques wrote:

It's Ok i find the solution with formatTotals, i open the page code and i see want you want to tell me.

Thanks for your help

Email :


2 . 2012-08-23 08:10:31

Jacques wrote:

Hello,

i see the formatTotals function but how to use it ?

I try with col_number_format but it's no doing that i want and if i use it only it's the same.

I have the total number like "3654.50" and i want "3654.50 k€", is it possible to do this ?

And the same for the days.

I see that i can change the decimal separator or format the date but for add a value to the total i don't see how to do that.

I want to add a sort of watermak for the total, i try with method setValue but it's only show me the value i wrote in the cell and not  the operation.

Email :


3 . 2012-08-23 06:52:11

Max wrote:

Hi Jacques,
Please have a look to these demos:
http://tablefilter.free.fr/demos.php?1=operation

and more specifically at the formatTotals function.

Email :


Top of page

9 . 2012-08-09 16:49:02

Laura wrote:

I have a problem with the sort when sorting a column of dates and not all the rows have a value. The dates are in the format mm-dd-yyyy for example: 12-31-2001.

If all the rows have dates in them, then they sort fine, but some of my rows are null or blank and then the sort does not work correctly. I would expect all the rows that are blank to sort as less than the earliest date, but they randomly appear throughout the table with dates being sorted between the blank dates. Is this a know bug?

some settings:

    default_date_type: 'mdy',

    sort: true,
    sort_config: {
            sort_types:['none','CaseInsensitiveString','CaseInsensitiveString','Number','Number','Number','mdydate','mdydate','mdydate','none']
              }     ,

 

 

 

Email : lgrella AT gmail DOT com


3 Replies

1 . 2012-08-27 07:32:21

Max wrote:

Hi Jaime,
If you install the latest version of the script, v2.5, this should be fixed now.
Cheers

Email :


2 . 2012-08-24 22:51:56

Jaime wrote:

Hi there, i''m facing the same problem sorting date columns with null cells.

 

Max, could you give me the reply you gave to Laura? Thanx in advance!

Email : jaime DOT lima AT pinhais DOT pr DOT gov DOT br


3 . 2012-08-13 00:55:55

Max wrote:

Hi Laura, I replied to your Support Request.

Email :


Top of page

10 . 2012-08-02 23:42:56

Jonas wrote:

I have this strange issue. Once I sort column numbers ar in this order : 90, 50, 40, 30, 20, 15, 12, 11, 100(!!), 9, 8,1. Why could highest number (100) be treated this way? 

Email : spamme donttype 1913 donttypeagain AT ignore gmail avoid com


4 Replies

1 . 2012-08-04 10:26:45

Max wrote:

Hi Jonas,
The only problem I see in your Pastebin code is that the <thead> has no <tr> Wink and this may confuse TF instantiation.
Also no need to define the numeric parameter in the setFilterGrid function, in your case

setFilterGrid("tt", filters);

is enough.

Email :


2 . 2012-08-03 11:13:53

Jonas wrote:

Max,

I was able to fix this problem by adding correct types to "new SortableTable(..)". For some reason I was writing header names instead of data types...

However, I'm still not able to produce sorting feature without calling SortableTable(), but I think I'm done now. Thanks for this great script.

Email :


3 . 2012-08-03 10:20:07

Jonas wrote:

Hi, Max,

Now I even don't know if I'm setting sortable table the correct way. I'm not even able to sort the table without using "new SortableTable(...)". Put my test table's code here http://pastebin.com/U6LLawkP 

I will try to figure this out

Email :


4 . 2012-08-03 03:20:53

Max wrote:

Hi Jonas,
Did you assign a number type to your column ?
...
sort_config: { 
        sort_types:['Number'...] 
},
...

Email :


Top of page

11 . 2012-08-01 22:02:28

Mike wrote:

Hello,

First of all, this is a great set of web components.  Excellent work!

I've been working through the documentation to create a prototype application for my company.  For the most part I'm able to accomplish what I need based on the docs.  One problem I haven't quite figured out is how to use multiple extensions.  It seems no matter how I configure the props I can only manage to get one extension working at a time.  Maybe I've overlooked an example or documentation on this.  Could anyone point me in the right direction?

Thanks,

Mike

 

Email : mmansfield AT educere DOT net


2 Replies

1 . 2012-08-03 03:14:01

Max wrote:

Hi Mike, happy to see you figure it out.

Email :


2 . 2012-08-01 22:50:21

Mike wrote:

Nevermind!  I read through again and it makes perfect sense how to implement multiple extensions.  I have this part of the script working now.

Email : mmansfield AT educere DOT net


Top of page

12 . 2012-07-31 11:39:26

Sathish wrote:

Hi
Name Grade
A A-1
B A-2
C A-3
D A-1
E A-2
F A-3
G A-1

How can i count the individual grades and display then as results

Like : A-1 = 3, A-2 = 2, A-3 = 3

Many Thank,

Sathish

Email : s DOT k DOT pittala AT hotmail DOT com


3 Replies

1 . 2012-08-07 03:28:39

Max wrote:

Sathish,
Please submit a Support Request for this.
Thanks

Email :


2 . 2012-08-06 13:38:56

Sathish wrote:

Hi Max,

 

I tried to get the result with operation callbacks, but did not had any luck to get the result. can you please droap a sample code for the example above, so that i can try to get it work for the rest.

 

Thanks,

Sathish

Email :


3 . 2012-08-03 03:12:39

Max wrote:

Hi Satish,
This should be possible by using the operation callbacks. Did you see these demos:
http://tablefilter.free.fr/demos.php?1=operation ?

Email :


Top of page

13 . 2012-07-28 07:24:55

Olivier wrote:

Hi Everyone,

 

fantastic scripts, congartualtions. I am slowly discovering all the capabilitis but want to master the basics firts.

 

2 questions:

1- Paging toolbar - Is there an easy way to show the paging tool bar twice? (ie. on top of the table and below the table?  I tried specifying paging_target_id twice and two DIv with the same ID... did not work.  

 

2- Sorting- I have enabled sorting on 3 columns (out of 7) This works beautifully on Chrome, Safari... but all messed up in IE. (Actually, your example filter-sort.htm also has problem on IE, sorting by year does not work, but works as expected in chrome and Safari) 

Many Thanks,

 

Olivier

Email : olivier DOT duhamel AT bodyscape DOT net DOT nz


4 Replies

1 . 2012-08-04 10:33:02

Max wrote:

Hi Olivier,
It seems to me you are having problems to post comments, I have experienced that with IE9 actually and with more than 1 screen, I am not sure this is related though...
Going back to the sort issue under IE9 I could recreate the bug, if you try IE8 compatibility it will work... I will try to fix this for the next version hopefully.

Email :


2 . 2012-08-03 06:33:54

Olivier wrote:

Post your comment here...

Email : olivier AT duhamel DOT bz


3 . 2012-07-28 10:27:31

Max wrote:

Thanks Olivier.
1. You could create your own toolbar containing the pagination buttons but it will not be an easy task for the rows counter. With some effort I think is feasible though...
2. I just checked and the demo filter-sort.htm works fine with IE 6, 7, 8, 9. Actually it is there since 2006 Wink
What is your IE version and OS?

Email :


4 . 2012-07-28 07:46:31

Olivier wrote:

Apologies for my poor spelling...   Should have read:

<<<Fantastic script, congratulations. I am slowly discovering all the capabilities but want to master the basics first.>>>

 

Cheers

Email : olivier DOT duhamel AT bodyscape DOT net DOT nz


Top of page

14 . 2012-07-27 00:13:58

ota wrote:

Hi, 

I have over 500,000 rows (songs) that I wanted to be able to filter out. In addition I have about 15 columns. Does it work to use the table filter to do that. The data is in the MySql database.

Email : ota AT t-com DOT me


1 Reply

1 . 2012-07-28 10:15:12

Max wrote:

Ota,
Please read the suggestions of this demo:
http://tablefilter.free.fr/extra-large-data.htm

Good luck, just for loading a page with a table of more than 500,000 rows, 15 columns each row Smile

Email :


Top of page

15 . 2012-07-26 16:18:44

Yohan wrote:

Hello,

Ok, I may be stupid for not making this script to work.

Assume I have the following html code which creates a simple table and this html is saved at C:\test.html:

 

<head>
<body>
<table border="1" cellpadding="5" cellspacing="5" width="100%">


<tr id="table1">

<th>One</th>
<th>Two</th>
</tr>

<tr>
<th>Table header</th>
<th>Table header</th>
</tr>
<tr>
<td width="20%">Table cell 1</td><td>Table cell 2</td>
</tr>

</table>


</body>
</head>

I have also downloaded the script and it is saved at C:\Tables\TableFilter

Now I want on the top of this table to add a dropdown list in order to filter the 1st column by the row values.

I modify the html as following:


<head>
<body>
<table border="1" cellpadding="5" cellspacing="5" width="100%">


<tr id="table1">

<th>One</th>
<th>Two</th>
</tr>

<tr>
<th>Table header</th>
<th>Table header</th>
</tr>
<tr>
<td width="20%">Table cell 1</td><td>Table cell 2</td>
</tr>

<script src="TableFilter/tablefilter.js" type="text/javascript"></script>
    var table3Filters = {
        btn: true,
        col_0: "select",
        col_2: "none",
        btn_text: "  >  "
    }
    setFilterGrid("table1",1,table3Filters);
</script>

</body>
</head>

 

How should I define where to look for the library? Obvioulsy "TableFilter/tablefilter.js" is not correct. Should I include the entire path?

I have tried all the paths but it doesn't work.

Sorry if this is a dummy question.

 

Best regards.

Email : brecia7 AT yahoo DOT com


1 Reply

1 . 2012-07-28 10:09:34

Max wrote:

Yohan,
From what I see there is a missing bit:

<script src="TableFilter/tablefilter.js" type="text/javascript"></script>
<script>

    var table3Filters = {
        btn: true,
        col_0: "select",
        col_2: "none",
        btn_text: "  >  "
    }
    setFilterGrid("table1",1,table3Filters);
</script>

Email :


Top of page

16 . 2012-07-18 15:35:14

mrutyunjaya kar wrote:

i am  getting following type of error

Microsoft JScript runtime error: Unable to get value of the property 'rows': object is null or undefined

returns total nb of filterable rows starting 

from reference row if defined

- Param:

- includeHeaders: if true header rows are

included in calculation(= table rows number)

=====================================================*/

 var s = this.refRow==undefined ? 0 : this.refRow;

var ntrs = this.tbl.rows.length;

if(includeHeaders){ s = 0; }

return parseInt(ntrs-s);

My code is following type--

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
   
    <link href="TableFilter/filtergrid.css" rel="stylesheet" type="text/css" />
    <script src="TableFilter/tablefilter_min.js" type="text/javascript"></script>
    <script src="TableFilter/tablefilter_all_min.js" type="text/javascript"></script>
    <script src="TableFilter/tablefilter_all.js" type="text/javascript"></script>
    <script src="TableFilter/tablefilter.js" type="text/javascript"></script>
    <script src="TableFilter/TF_Modules/tf_paging.js" type="text/javascript"></script>
    <script src="TableFilter/ezEditTable/ezEditTable_min.js" type="text/javascript"></script>
    <link href="TableFilter/ezEditTable/ezEditTable.css" rel="stylesheet" type="text/css" />
    <script src="TableFilter/ezEditTable/ezEditTable.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript"> 
    //<![CDATA[
        var table9_Props = {
            paging: true,
            paging_length: 2,
            results_per_page: ['# rows per page', [2, 4, 6]],
            rows_counter: true,
            rows_counter_text: "Rows:",
            btn_reset: true,
            btn_next_page_html: '<a href="javascript:;" style="margin:3px;">Next ></a>',
            btn_prev_page_html: '<a href="javascript:;" style="margin:3px;">< Previous</a>',
            btn_last_page_html: '<a href="javascript:;" style="margin:3px;"> Last >|</a>',
            btn_first_page_html: '<a href="javascript:;" style="margin:3px;"><| First</a>',
            loader: true,
            loader_html: '<h4 style="color:red;">Loading, please wait...</h4>'
        };
        var tf9 = setFilterGrid("table9", table9_Props); 
    //]]> 
    </script> 

</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
   <table id="table9" class="mytable" cellpadding="0" cellspacing="0">
          <tr>
            <th>World Regions</th>
            <th>Population ( 2007 Est.)</th>
            <th>Population % of World</th>
            <th>% Population ( Penetration )</th>
            <th>Usage % of World</th>
          </tr>
          <tr>
            <td>Africa</td>
            <td>933,448,292</td>
            <td>14.2 %</td>
            <td>3.5 %</td>
            <td>3.0 %</td>
          </tr>
          <tr>
            <td>Asia</td>
            <td>3,712,527,624</td>
            <td>56.5 %</td>
            <td>10.5 %</td>
            <td>35.6 %</td>
          </tr>
          <tr>
            <td>Europe</td>
            <td>809,624,686</td>
            <td>12.3 %</td>
            <td>38.6 %</td>
            <td>28.6 %</td>
          </tr>
          <tr>
            <td>Middle East</td>
            <td>193,452,727</td>
            <td>2.9 %</td>
            <td>10.0 %</td>
            <td>1.8 %</td>
          </tr>
          <tr>
            <td>North America</td>
            <td>334,538,018</td>
            <td>5.1 %</td>
            <td>69.4 %</td>
            <td>21.2 %</td>
          </tr>
          <tr>
            <td>Latin America / Caribbean</td>
            <td>556,606,627</td>
            <td>8.5 %</td>
            <td>16.0 %</td>
            <td>8.1 %</td>
          </tr>
          <tr>
            <td>Oceania / Australia</td>
            <td>34,468,443</td>
            <td>0.5 %</td>
            <td>53.5 %</td>
            <td>1.7 %</td>
          </tr>
        </table>
</asp:Content>

any help,  i will be more appreciated

 

 

 

 

 

 

Email : mrutyunjayakar AT gmail DOT com


11 Replies

1 . 2012-08-09 01:10:13

Max wrote:

Hi mrutyunjaya kar,
Please submit a Support Request for this one.
Cheers

Email :


2 . 2012-08-08 18:13:30

mrutyunjaya kar wrote:

Hi max,

After adding ezEditTable.js file , only one filter is coming (what i wanted). But my Individual column filter is not coming. Is there anything i have to add ?. another can we make paging in footer instead of header( both header and footer)

my code is below

 

<link href="filtergrid.css" rel="stylesheet" type="text/css" />

    <link href="ezEditTable.css" rel="stylesheet" type="text/css" />

    <script src="tablefilter_all_min.js" type="text/javascript"></script>

    <script src="ezEditTable.js" type="text/javascript"></script>

 

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

 <asp:GridView ID="gridview1" runat="server" CellPadding="4" ForeColor="#333333" ShowFooter="true"

                    BackColor="WhiteSmoke" AllowPaging="false" GridLines="Horizontal" CssClass="mytable"

                    Font-Size="9pt" Font-Names="Arial" AutoGenerateColumns="False" BorderStyle="Solid"

                    BorderWidth="1px">

                    <Columns>

                      ------

                    </Columns>

                    <SelectedRowStyle BackColor="AliceBlue" />

                    <AlternatingRowStyle BackColor="Azure" />

                </asp:GridView>

 

                     <script language="javascript" type="text/javascript">

//<![CDATA[

                         var table9_Props = {

                             highlight_keywords: true,

 

                             on_keyup: true,

 

                             on_keyup_delay: 1500,

 

                             single_search_filter: true,

 

                             selectable: true,

                             paging: true,

                             paging_length: 2,

                             results_per_page: ['# rows per page', [2, 4, 6]],

                             rows_counter: true,

                             rows_counter_text: "Rows:",

                             btn_reset: true,

                             btn_next_page_html: '<a href="javascript:;" style="margin:3px;">Next ></a>',

                             btn_prev_page_html: '<a href="javascript:;" style="margin:3px;">< Previous</a>',

                             btn_last_page_html: '<a href="javascript:;" style="margin:3px;"> Last >|</a>',

                             btn_first_page_html: '<a href="javascript:;" style="margin:3px;"><| First</a>',

                             loader: true,

                             loader_html: '<h4 style="color:red;">Loading, please wait...</h4>'

                         };

                         var tf9 = setFilterGrid("<%= gridview1.ClientID%>", table9_Props);

//]]>

</script>

 

Email : mrutyunjayakar AT gmail DOT com


3 . 2012-08-01 10:46:21

Max wrote:

From the error I see I would say the ezEditTable module is not loaded. Make sure the ezEditTable.js file is imported in your page if you want to make the rows selectable, for instance.

Email :


4 . 2012-07-30 10:49:09

mrutyunjaya kar wrote:

Hi Max,

I want to add extra single filter(as like example table 12) to my Table 9 example. Now Table -9 example is working, 

when i am adding 

highlight_keywords: true,

on_keyup: true,

on_keyup_delay: 1500,

single_search_filter: true,

selectable: true

to my table 9 example i am getting error  Microsoft JScript runtime error: 'EditTable' is undefined error is coming

Now

mytable9_props{

 

         highlight_keywords: true,

            on_keyup: true,

            on_keyup_delay: 1500,

            single_search_filter: true,

            selectable: true,

                             paging: true,

                             paging_length: 2,

                             results_per_page: ['# rows per page', [2, 4, 6]],

                             rows_counter: true,

                             rows_counter_text: "Rows:",

                             btn_reset: true,

                             btn_next_page_html: '<a href="javascript:;" style="margin:3px;">Next ></a>',

                             btn_prev_page_html: '<a href="javascript:;" style="margin:3px;">< Previous</a>',

                             btn_last_page_html: '<a href="javascript:;" style="margin:3px;"> Last >|</a>',

                             btn_first_page_html: '<a href="javascript:;" style="margin:3px;"><| First</a>',

                             loader: true,

                             loader_html: '<h4 style="color:red;">Loading, please wait...</h4>'  

 

}

Is there any wrong ?

what type Js file  i have to add

Thanks

Mrutyunjaya


Email : mrutyunjayakar AT yahoo DOT com


5 . 2012-07-30 10:31:05

mrutyunjaya kar wrote:

Thanks Max, Now I removed # sign . It is working,

 

Thank you again,

 

Email : mrutyunjayakar AT gmail DOT com


6 . 2012-07-28 10:05:08

Max wrote:

Hi Mrutyunjaya,
Does the GridView control generate a HTML table element?
If yes, again, does the table exist when you call the setFilterGrid function?
Try an alert just after the GridView control:

<script>alert('<%= table9.ClientID%>');</script> //NOTE WITH NO '#', THIS IS NOT A JQUERY PLUGIN!

if it is null the table is still not rendered by the browser.

 

Email :


7 . 2012-07-25 13:19:37

mrutyunjaya kar wrote:

Hi Max,

It is working when i am giving HTML table. But when i am giving gridview inside masterpage , It is not working same previous error is coming  I tried both ways giving "#<%= table9.ClientID%>" and  table 9 as  var tf9 = setFilterGrid("#<%= table9.ClientID%>", table9_Props) and var tf9 = setFilterGrid(' table9', table9_Props).

 

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">

 <link href="filtergrid.css" rel="stylesheet" type="text/css" />

    <script src="tablefilter_all_min.js" type="text/javascript"></script>

 

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

 <asp:GridView ID="table9" runat="server" CellPadding="4" ForeColor="#333333" ShowFooter="true"

                    BackColor="WhiteSmoke" AllowPaging="false" GridLines="Horizontal" CssClass="mytable"

                    Font-Size="9pt" Font-Names="Arial" AutoGenerateColumns="False" BorderStyle="Solid"

                    BorderWidth="1px">---------</gridview>

<script------></script>

Is it working on gridview ?

 

Thanks

Mrutyunjaya

 

 

 

 

Email : mrutyunjayakar AT gmail DOT com


8 . 2012-07-25 12:22:52

mrutyunjaya kar wrote:

Thanks, It is working

Email : mantukar AT gmail DOT com


9 . 2012-07-20 02:26:41

Max wrote:

Martin,
Follow my instructions:

  1. Remove this script:
    <script src="TableFilter/tablefilter.js" type="text/javascript"></script>
  2. Place TF intantiation under your table:
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
       <table id="table9" class="mytable" cellpadding="0" cellspacing="0">
    ...
       </table>

       <script language="javascript" type="text/javascript"> 
        var tf9 = setFilterGrid("table9", table9_Props); 
       </script>

    </asp:Content>

From what I see, it seems to me you are invoking the setFilterGrid method before the table actually exists in the document, the DOM element is not yet there.

There are a lot of resources available, please read the documentation carefully:
http://tablefilter.free.fr/doc.php

and also check the demos out:
http://tablefilter.free.fr/demos.php

you will find answers to most of your questions Smile

By the way, also read the Rules at the top of this page, there is no need to post entire pages.

If you need assistance, you can also place a Premium Support Request .

Cheers

Email :


10 . 2012-07-19 16:10:47

mrutyunjaya kar wrote:

I am getting same error. If  I am adding 2 Js file. I am getting different error

Microsoft JScript runtime error: Object doesn't support property or method 'GetRowsNb'

if(!this.fltGrid)
        {//filters grid is not genetared
            this.refRow = (this.refRow-1);
            if(this.gridLayout) this.refRow = 0;
            this.nbFilterableRows = this.GetRowsNb();
            this.nbVisibleRows = this.nbFilterableRows;
            this.nbRows = this.nbFilterableRows + this.refRow;

Now  My code is :


<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
   
    <link href="TableFilter/filtergrid.css" rel="stylesheet" type="text/css" />
  
    <script src="TableFilter/tablefilter_all_min.js" type="text/javascript"></script>
     <script src="TableFilter/tablefilter.js" type="text/javascript"></script>
  

    <script language="javascript" type="text/javascript"> 
    //<![CDATA[
        var table9_Props = {
            paging: true,
            paging_length: 2,
            results_per_page: ['# rows per page', [2, 4, 6]],
            rows_counter: true,
            rows_counter_text: "Rows:",
            btn_reset: true,
            btn_next_page_html: '<a href="javascript:;" style="margin:3px;">Next ></a>',
            btn_prev_page_html: '<a href="javascript:;" style="margin:3px;">< Previous</a>',
            btn_last_page_html: '<a href="javascript:;" style="margin:3px;"> Last >|</a>',
            btn_first_page_html: '<a href="javascript:;" style="margin:3px;"><| First</a>',
            loader: true,
            loader_html: '<h4 style="color:red;">Loading, please wait...</h4>'
        };
        var tf9 = setFilterGrid("table9", table9_Props); 
    //]]> 
    </script> 

</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
   <table id="table9" class="mytable" cellpadding="0" cellspacing="0">
          <tr>
            <th>World Regions</th>
            <th>Population ( 2007 Est.)</th>
            <th>Population % of World</th>
            <th>% Population ( Penetration )</th>
            <th>Usage % of World</th>
          </tr>
          <tr>
            <td>Africa</td>
            <td>933,448,292</td>
            <td>14.2 %</td>
            <td>3.5 %</td>
            <td>3.0 %</td>
          </tr>
          <tr>
            <td>Asia</td>
            <td>3,712,527,624</td>
            <td>56.5 %</td>
            <td>10.5 %</td>
            <td>35.6 %</td>
          </tr>
          <tr>
            <td>Europe</td>
            <td>809,624,686</td>
            <td>12.3 %</td>
            <td>38.6 %</td>
            <td>28.6 %</td>
          </tr>
          <tr>
            <td>Middle East</td>
            <td>193,452,727</td>
            <td>2.9 %</td>
            <td>10.0 %</td>
            <td>1.8 %</td>
          </tr>
          <tr>
            <td>North America</td>
            <td>334,538,018</td>
            <td>5.1 %</td>
            <td>69.4 %</td>
            <td>21.2 %</td>
          </tr>
          <tr>
            <td>Latin America / Caribbean</td>
            <td>556,606,627</td>
            <td>8.5 %</td>
            <td>16.0 %</td>
            <td>8.1 %</td>
          </tr>
          <tr>
            <td>Oceania / Australia</td>
            <td>34,468,443</td>
            <td>0.5 %</td>
            <td>53.5 %</td>
            <td>1.7 %</td>
          </tr>
        </table>
</asp:Content>

 

If  I am removing   <script src="TableFilter/tablefilter.js" type="text/javascript"></script> I am getting previous error

Thanks For your reply

 

Email : mrutyunjayakar AT gmail DOT com


11 . 2012-07-19 01:28:41

Max wrote:

Hi Martin,

Please move the javascript block instantiating the TF object
...
var tf9 = setFilterGrid("table9", table9_Props); 

Just after the asp:Content control containing your table. Also I noticed you are importing all the tablefilter js documents:

    <script src="TableFilter/tablefilter_min.js" type="text/javascript"></script>
    <script src="TableFilter/tablefilter_all_min.js" type="text/javascript"></script>
    <script src="TableFilter/tablefilter_all.js" type="text/javascript"></script>
    <script src="TableFilter/tablefilter.js" type="text/javascript"></script>

Choose just one, for example:
<script src="TableFilter/tablefilter_all_min.js" type="text/javascript"></script>

Cheers

Email :


Top of page

17 . 2012-07-17 15:38:16

Martin wrote:

Hi, I have a little problem here. I managed to implement the 'Checkbox Selection Grid' demo into my table. The problem is i want to mark the same rows which were selected before submitting the form in which is the table I tried this >> 'select_row_at_start: true, row_index_at_start: 3,' and it marks one row without a proble bud is there a way to mark more rows..? Thanks in advance

Email : martin85 AT abv DOT bg


1 Reply

1 . 2012-07-17 21:53:13

mrutyunjaya wrote:

i ma getting error on Microsoft JScript runtime error: Unable to get value of the property 'rows': object is null or undefined 

 

on

 

 

/*====================================================

- returns total nb of filterable rows starting 

from reference row if defined

- Param:

- includeHeaders: if true header rows are

included in calculation(= table rows number)

=====================================================*/

 var s = this.refRow==undefined ? 0 : this.refRow;

var ntrs = this.tbl.rows.length;

if(includeHeaders){ s = 0; }

return parseInt(ntrs-s);

Email : mrutyunjayakar AT gmail DOT com


Top of page

18 . 2012-07-03 20:50:29

Row grouping using column visibility extension? wrote:

I see a few months ago that Salman A. Kagzi wrote an addition to the columns visibility extensionand he mentioned that he added functionality for sub-grouping where if you hide a column, you can group by that column and add a header for the hidden column. I am looking for this functionality. I have a table where I need to group by one column and can possibly expand and collapse this as well. Does anyone know if this was added to the coluimns visibilty extension?

 

THanks,

Laura

Email : l grella at acquiremedia dot com


1 Reply

1 . 2012-07-05 04:46:10

Max wrote:

Hi Laura,
I haven't heard back from Salman yet, and this feature is not implemented at the moment.

Email :


Top of page

19 . 2012-06-13 06:40:17

Baladhandayutham wrote:

Hi,

I found a problem in function mmm2mm() from tablefilter_all.js.

If i specify the month as 'May', the value returned after the 'for' loop is 5.

The condition "if ((mondigit > 11)||(mondigit<23)){mondigit=mondigit-12;}" makes the mondigit to negative value. This leads to improper date based sorting.

If we change the condition to "if ((mondigit > 11) && (mondigit<23)){mondigit=mondigit-12;}", sorting issue gets fixed.

Thanks & Regards

Bala

Email : balan DOT ranganathan AT gmail DOT com


2 Replies

1 . 2012-06-19 06:20:58

Baladhandayutham wrote:

No problem.

Thanks & Regards
Bala 

Email :


2 . 2012-06-14 01:16:07

Max wrote:

Hi Bala,
Thanks for fixing this out. I will include this patch in the next release.
Do you agree if I add your name in the list of contributors in the script's credits?

Email :


Top of page

20 . 2012-05-30 19:22:07

irwin wrote:

Once again, congratulations on your work.  I have several times devised work-arounds only to rip them out when I discovered you had already provided a configuration option  for what I wanted to do.

Now I will ask first.  I have two filtered versions of the same table.  The first uses dropdown lists for most columns and selection occurs onchange with a maximum of one filter value per column.  The second uses checklists for most columns and selection occurs when a GO button is clicked--no maximum number of values per column.

Right now I reload the page when the user wants to toggle from one version to the other.  This is OK for good internet connections but bad for slow connections.  Is there a convenient way to reconfigure the filter setup on the fly from one version to the other?

 

Email : iblyahoo-example AT yahoo DOT com


1 Reply

1 . 2012-06-02 04:32:12

Max wrote:

Thanks Irwin!

You could be able by using the API to avoid a page re-load and refresh the filters configuration instead, although it might not be straightforward, especially if your versions differ not only on the type of filters but in many other features. I suggest to have a look to the public methods RemoveGrid(), AddGrid() or RefreshGrid() in the doc section: http://tablefilter.free.fr/doc_methods.php.

You can always place a support request if you wish.

Email :


Top of page

21 . 2012-05-25 13:23:42

George Brennan wrote:

I must congratulate you on this, it's excellent.

I was just about to try to modify the filter behaviour and I thought I'd ask  a question first.

 I'm thinking of setting the checkboxes and then repositioning them in another DIV structure  along side the main table.

Is it possible to relocate the filter row  to another location ( e.g. another table ) or is it's positioning essential to the event handlers and population.

Regards

George

Email : g DOT brennan AT onyxnet DOT co DOT uk


2 Replies

1 . 2012-06-27 18:29:33

George Brennan wrote:

Hi Max, the external filter option look great,

Out of curiosity I'd tried relocating the id around

 

 

 

#815   fltrow = this.tbl.insertRow(this.filtersRowIndex);

fltrow = tf_Id(

"gbtab").insertRow(this.filtersRowIndex);

Works, but nowhere near as nice as external filtering, thanks.

next thing I'm going to try is finding how to remove repeating data to show

a,b,c

  c ,d

     ,e

Regards

George

 

 

 

 

Email : g DOT brennan AT onyxnet DOT co DOT uk


2 . 2012-05-26 03:56:52

Max wrote:

Thanks George.
Yes, you can locate the filters at desired location on the page, the script will generate them if a container target id is specified. Have a look to these demos:

http://tablefilter.free.fr/demos.php?1=external_

In your cofiguration object set the external_flt_grid property true and use the external_flt_grid_ids property to define the container ids:

var yourConfig = {
...
   external_flt_grid: true,
   external_flt_grid_ids: ['targetId0','targetId1','targetId2','targetId3'...],
...
};

Keep me posted.

Max

Email :


Top of page

22 . 2012-05-22 21:44:21

gungor wrote:

I load table data (tbody) from database via AJAX call.

But after loading, table filter doesn't process this data.

Dropdown lists are empty. Table row number seems as zero.

How can I reftesh filter?

Thanks.

Gungor

 

Email : gngr DOT gungoren AT gmail DOT com


2 Replies

1 . 2012-05-23 21:35:57

gungor wrote:

Thanks a lot Max,

RefreshGrid() solved my problem.

Gungor

Email :


2 . 2012-05-23 12:41:55

Max wrote:

Hi gungor,
Make sure you refresh the columns filters each time the AJAX call is performed. You can use the RefreshGrid() public method in order to do so: http://tablefilter.free.fr/doc_methods.php
Also have a look to the AJAX demos:
http://tablefilter.free.fr/demos.php?0=ajax

This should help you out. Keep me posted.

Email :


Top of page

23 . 2012-05-04 17:33:08

Jimmy wrote:

Hello there,

Thanks for that great work! It works so perfectly!

I would like to know if it's possible to print the table. Is there an extension for it?

Because when i'm trying to print my tables, somes lines are missing (when there's no data in a cell per example).

 

Best regards,

 

Jimmy

Email : jimnault AT hotmail DOT com


1 Reply

1 . 2012-05-07 14:19:14

Max wrote:

Thanks Jimmy.
Unfortunately there is no extension for printing the table at the moment. You need to make your own stylesheet for the print media. You know the ID of the table, so you can create your classes based on that ID.
I will try to include this feature in the next release(s)unless you may want to submit a feature request.

Email :


Top of page

24 . 2012-04-25 11:44:10

forestgreen wrote:

Hi and thanks again for this great piece of software. I run it on a quite extended table (approx. 1000 rows) and it performs well.

Now I would like to ask whether it is possible to initiate a filter (drop-down select) or text search action automatically when the page with the table is opened in the browser. For that I would need to hand over search or filter criteria to the script.
How can this be achieved (if possible at all)?

Email : cdg DOT forestgreen AT gmail DOT com


5 Replies

1 . 2012-04-27 09:01:27

Max wrote:

Happy to see you managed to figure it out, Christian!

Email :


2 . 2012-04-26 11:41:22

forestgreen wrote:

Yes, I have found out now that the problem seems to be more on my side (like in most cases, the problem is in front of the PC, not inside ;-)  -  filtering works properly if I hand over one of the parameters which are exactly contained in the custom_slc_options["values"] list. Only if I try to hand over other text strings or part of one from the values list, filtering will not work.

I can understand this behaviour well, because it is in line with the use of the filter drop-down list on the displayed page. Yet, in some cases it might be practical if I could also hand over other text params or partly text strings here...

Best regards, Christian (alias forestgreen)

Email : cdg DOT forestgreen AT gmail DOT com


3 . 2012-04-26 10:43:51

Max wrote:

What are you using? The querystring parameters or the on_filters_loaded callback?

Email :


4 . 2012-04-26 10:36:15

forestgreen wrote:

Thank You, this is great, I got it working with your help!

There is now only one problem remaining: I am using for some of the 'select' columns the custom_slc_options in order to define specific values in the drop-down lists. Only for these columns the handing over of filter parameters is not working - the filter does not filter anything then.
Do you have any idea if this can be overcome?

(P.S.: I am running the latest version of your script - 2.30)

Email : cdg DOT forestgreen AT gmail DOT com


5 . 2012-04-26 01:20:07

Max wrote:

Thanks forestgreen!
Please have a look to this demo in order to see how to set filters values at script's load (on_filters_loaded callback event):

http://tablefilter.free.fr/data-types.htm


Or could also achieve that by using URL querystring parameters as shown in this demo:

http://tablefilter.free.fr/url-params.htm

Actually the demos page works like this:
http://tablefilter.free.fr/demos.php?1=on_filters_loaded

Email :


Top of page

25 . 2012-04-16 17:20:25

Salman A. Kagzi wrote:

Hello Max.

If you could help me out, I am bit Confused here.

I have configured ColumnVisibility manager for my FilterTable and it works like a charm. Now when I try and use the on_after_col_is_hidden and on_after_col_is_displayed callback. I dont know for what reason on_after_col_is_hidden is getting called after the Column is being displayed and the on_after_col_is_displayed is getting called after the Column is being hidden. Any idea why this colud be happening?

I have showHide_cols_tick_to_hide = false in my configuration. Can that be causing this?

 

Thanks.

Email : salman DOT kagzi AT gmail DOT com


6 Replies

1 . 2012-04-21 12:23:20

Max wrote:

Hi Salman,
I have just posted a new version of the Columns Visibility Manager extension with your code and other few changes.
Thanks for your contribution and keep me posted for the sub-group feature Smile.

Email :


2 . 2012-04-18 12:54:07

Salman A. Kagzi wrote:

Thanks Max. That'll be an honor.

 

FYI. I have also made some Modification to the extension to enable Grouping of the Headers by section or as a developer wants. The changes does not do much at this stage it just creates sub-group in the header pop-up and adds a 10px padding on the Left.

I am further planning to add feature where in I can collpase/expand the sub-group in the pop-up and provide a Check-box for select all/none from the sub-group.

Let me know if you are interested in this change and I shall Copy my changes in one of the Comments :)

Email : salman DOT kagzi AT gmail DOT com


3 . 2012-04-18 00:33:29

Max wrote:

No worries Salman. Thanks for your fix, I will use for the next release of this extension.
Can I credit your name in the code?

Email :


4 . 2012-04-17 08:24:29

Salman A. Kagzi wrote:

Apologies. The comment got posted midway.

 

Following are the changes that I made to Columns Visibility Manager script.

 

TF.prototype._CheckItem = function(o,el)

{

var li = el.lbl;

if(li == null || li.firstChild == null) return;

var isChecked = li.firstChild.checked;

var colIndex = li.firstChild.getAttribute('id').split('_')[1];

if(isChecked)

tf_addClass(li.parentNode,o.showHideColsListSlcItemCssClass);

else

tf_removeClass(li.parentNode,o.showHideColsListSlcItemCssClass);

 

var hide = ((o.showHideColsTickToHide && isChecked) || (!o.showHideColsTickToHide && !isChecked)) ? true : false;

o._ShowHideCol(colIndex, hide);

}

 

TF.prototype._ShowHideCol = function(colIndex, hide)

{

var o = this;

var col = tf_Tag(o.tbl,'col')[colIndex];

//External headers

var col1 = (o.showHideColsHeadersTbl) 

? tf_Tag(o.showHideColsHeadersTbl,'col')[colIndex] : null;

if(o.onBeforeColIsHidden && hide) o.onBeforeColIsHidden.call(null, o, colIndex);

if(o.onBeforeColIsDisplayed && !hide) o.onBeforeColIsDisplayed.call(null, o, colIndex);

if(o.tblHasColTag && tf_isIE)

{//cols can be hidden only under IE

var tbl = (o.showHideColsHeadersTbl) ? o.showHideColsHeadersTbl : o.tbl;

var filtersRow = tbl.rows[o.GetFiltersRowIndex()];

var a1 = o.GetFiltersByType(o.fltTypeSlc,true);

var a2 = o.GetFiltersByType(o.fltTypeMulti,true);

var a = a1.concat(a2);

if(col){ 

col.style.display = (hide) ? 'none' : '';

//Selects are displayed even if column is hidden under IE6

if(a.tf_Has(colIndex))

{

if(o.showHideColsHeadersTbl == null){

filtersRow.cells[colIndex].style.visibility = (hide) ? 'hidden' : 'visible';

}

else{

var flt = tf_Id(o.fltIds[colIndex]);

flt.style.visibility = (hide) ? 'hidden' : 'visible';

}

}

}

if(col1){ 

col1.style.display = (hide) ? 'none' : '';

}

} else {

function hideCells(tbl)

{

for(var i=0; i<tbl.rows.length; i++)

{

var row = tbl.rows[i];

var cell = row.cells[colIndex];

if(cell){

cell.style.display = (hide) ? 'none' : '';

}

}

}

hideCells(o.tbl);

if(o.showHideColsHeadersTbl) hideCells(o.showHideColsHeadersTbl);

}

if(o.onAfterColIsHidden && hide){

//This event is fired just after a column is displayed for grid_layout compatibility

if(o.gridLayout){

//Returns the removed column widths

function getHiddenWidth(){

var ths = o.headTbl.rows[o.showHideColsHeadersIndex].cells;

var hW = 0;

for(var i=0; i<o.nbCells; i++){

if(ths[i].style.display == 'none'){ 

var w = parseInt(ths[i].style.width);

ths[i].style.width = 0;

hW += w;

}

}

return hW;

}

if(tf_isIE || tf_isIE7){

o.tbl.style.width = o.headTbl.clientWidth+'px';

} else {

o.headTbl.style.width = (parseInt(o.headTbl.style.width) - getHiddenWidth()) + 'px';

o.tbl.style.width = o.headTbl.style.width;

o.gridColElms[colIndex].style.display = 'none';

}

}

o.onAfterColIsHidden.call(null, o, colIndex);

}

if(o.onAfterColIsDisplayed && !hide){

//This event is fired just after a column is displayed for grid_layout compatibility

if(o.gridLayout && (!tf_isIE && !tf_isIE7)){

o.gridColElms[colIndex].style.display = '';

var w = parseInt(o.gridColElms[colIndex].style.width);

o.crWColsRow.cells[colIndex].style.width = w+'px';

o.headTbl.style.width = (parseInt(o.headTbl.style.width)+w) + 'px';

o.tbl.style.width = o.headTbl.style.width;

}

o.onAfterColIsDisplayed.call(null, o, colIndex);

}

}

 

 

To Summarize the changes, I have added 1 line var hide = ((o.showHideColsTickToHide && isChecked) || (!o.showHideColsTickToHide && !isChecked)) ? true : false; in _CheckItem method which takes care of identifying if its a Hide/Show call. I have updated _ShowHideCol method to remove all the if/else statements that used to take of showHideColsTickToHide values.

 

I hope this helps in someway to keep the Good Work going :)

 

Thanks.

Email : salman DOT kagzi AT gmail DOT com


5 . 2012-04-17 08:09:19

Salman A. Kagzi wrote:

Hi Max.

Yes. That attribute was the problem. It seems that the Script does not take into consideration showHide_cols_tick_to_hide in _ShowHideCol method. To fix this I have amde following changes to the Script.

Added following line to _CheckItem function.

var hide = ((o.showHideColsTickToHide && isChecked) || (!o.showHideColsTickToHide && !isChecked)) ? true : false;

Email : salman DOT kagzi AT gmail DOT com


6 . 2012-04-17 01:14:09

Max wrote:

Hi Salman,
I have no idea actually. Have you tried with that property set true? If the callbacks are invoked at the right moment, then this is the cause, I guess...
I will try to check that whenever I have some time in my spare time.

Email :


Top of page

26 . 2012-04-14 10:38:53

Salman A. Kagzi wrote:

Hi There. I have recently started using Columns Visibility extenssion with Table Filter and as always its a wonderful utility on a Table.

 

I noticed that when using ShowCol & HideCol functions to Show/Hide a table column using a script from outside tablefilter, it wont update the state on Checkbox in the Visibility manager column list.

Not sure if this is intentional or a bug.

As i needed to update the State as well, I have written down something taking inspiration from TFExt_ColsVisibility.js.

If the behaviour of above functions was intentional, it would be good to have another set that also update the Checkbox state. Hope this code makes it simpler to add these functions. 

 

var hideCol = function (colIndex, myTfInstance) {

var itm = tf_Id('col_' + colIndex + '_'+myTfInstance.id);

if(itm && ((myTfInstance.showHideColsTickToHide && !itm.checked) || (!myTfInstance.showHideColsTickToHide && itm.checked))) {

itm.click();

}

};

 

var showCol = function (colIndex, myTfInstance) {

var itm = tf_Id('col_' + colIndex + '_'+myTfInstance.id);

if(itm && ((myTfInstance.showHideColsTickToHide && itm.checked) || (!myTfInstance.showHideColsTickToHide && !itm.checked))) {

itm.click();

}

};

Email : salman DOT kagzi AT gmail DOT com


3 Replies

1 . 2012-04-16 10:01:37

Salman A. Kagzi wrote:

Hey max.

 

If you think sending a patch for the Changes I have mentioned will help you get on with this, do let me know. It will be my pleasure do that.

I you are looking out for a Patch, do let me know if You want to replace the existing ShowCol/HideCol methods or create a set of new ones.

 

FYI. I am also working on an interesting change to this plugin around Grouping of Columns headers under a title. Might have a treat for all there as well :)

Email : salman DOT kagzi AT gmail DOT com


2 . 2012-04-16 00:53:33

Max wrote:

Hi Salman,
That's true, the checkbox state doesn't seem to be updated. That's not a bug though, it simply hasn't been implemented. I will try to update the ShowCol() and HideCol() public methods in order to do so.
Alternatively you could use the on_after_col_is_displayed and on_after_col_is_hidden callback functions to change the state of the checkboxes and use your code inside.
Thanks Salman for your contribution,l I will use your code in order to update the ShowCol() and HideCol() public methods and let you know when it is done. However I still don't know when I will have time to dedicate to this...

Email :


3 . 2012-04-14 10:41:50

Salman A. Kagzi wrote:

Sorry the code formatting has fallen out completely.

 

Let me know if there are any scopes of improving these functionss further.

Email : salman DOT kagzi AT gmail DOT com


Top of page

27 . 2012-04-13 10:49:18

Mikkel Kristensen wrote:

Hi Max!

First of all - this is a very great script that I enjoy a lot - thanks!

Now to my problem:

After updating the script to 2.3 the script no longer sorts on load (I'm using Sortable Table), when paging is enabled. If I "downgrade" to an earlier version I have on my computer the sorting on load works again, but some of the new cool features doesn't work.

If paging is disabled it works fine.

Please let me know if you need further information.

Kind regards
Mikkel

Email : mikkelek AT hotmail DOT com


2 Replies

1 . 2012-05-24 17:01:45

Mikkel Kristensen wrote:

Thanks for your reply.

I read your comment to Joseph, but the sorting is working for me and I have the .js-files in the same library just as the documentation says.

The problem only occurs when sorting on load when paging is enabled.

Kind regards
Mikkel

Email : mikkelek AT hotmail DOT com


2 . 2012-04-13 12:58:36

Max wrote:

Hi Mikkel,
Please have a look at my replies to Joseph's comment (3 . 2012-04-04 17:38:26).

Email :


Top of page

28 . 2012-04-10 14:50:55

piepiax wrote:

Hi Max,

I have 2 questions for you (and other readers)

First:

I use TFOOT tag to exclude non interresting lines for filtering and/or sorting and I have a problem with the rows_counter feature.

At the first page load, the count corresponds to all the TBODY and TFOOT lines but when I filter or just do a reset, the correct count (ie only TBODY) is showed.

Is there any feature to set up in order to have only the TBODY count at the 1st page load ? (I don't find it !)

Second:

I use the new Gouped fheader functionnality and it seems that I have a problem with the sorting function when I use ROWSPAN tag in the header. Is it compatible?

Here an example with filters_row_index:2 and headers_row_index:1 and setFilterGrid('myTableId', 2, myConfig);

ID1 ID2 ID3
ID2-1 ID3-1
The sort feature is not functional but if i add an empty cell behind ID1, it works

 

Email : piepiax AT free DOT fr


6 Replies

1 . 2012-04-13 13:41:40

piepiax wrote:

Hi,

 

Thanks for tour help it works fine (I just adapt the the join function to take into account the input_watermark feature)

I can't send you the URL because the code is on Intranet

Piepiax

Email :


2 . 2012-04-12 14:14:23

Max wrote:

Ok,
o.refreshFilters is a behaviour that has nothing to do with Clear filters event. In order to know if it is a Clear filters event, callback does not exist for the moment, I suggest to test the o.GetFiltersValue() method, returning an array with the value of each filter. If there are no values it is a clear event:
...
if(o.GetFiltersValue().join('') == '') { // your logic for reset };
...

I havent tested the join function, I am not sure the empty string result is correct (" " or ""), but this is the idea.
Btw, if your project is public, I appreciate if you send the URL for my references list.

Email :


3 . 2012-04-12 10:22:45

piepiax wrote:

Hi Max,

 

Thanks for the example

I use the on_after_filter function to hide the TFOOT lines (except the last in my case)

<code>

on_after_filter: function(o){
            alert(o.refreshFilters); <= always false ?
            var tfoot = tf_Tag(o.tbl,'tfoot');
            if(tfoot.length>0){
                var tfootTr = tf_Tag(tfoot[0],'tr');
                for(var tr_i=0;tr_i<(tfootTr.length)-1;tr_i++){
                    tfootTr[tr_i].style.display = 'none' if not reseting;
                }
            }
        },

</code>

It works when I filtered my table But I have always a problem when I reset the filters.

Indeed, when I reset the filters, I want to see all the table rows even the TFOOT ones but the Reset function is hiding also the TFOOT lines.

I tried to identify a clear event or refreshFilters without succes and I don't find the right variable to test if it's reseting and not filtering ?

Thanks for your help

Email :


4 . 2012-04-12 00:49:19

Max wrote:

Hi Piepiax,
Why not for the GetRowsNb function. Otherwise, again you could perform those specific actions, show/hide TFOOT rows, by using the on_before_filter and on_after_filter callback events:
...
on_before_filter: function(o){
   var tfoot = tf_Tag(o.tbl,'tfoot')[0];
   tfoot.style.display = 'none';
},
on_after_filter: function(o){
   var tfoot = tf_Tag(o.tbl,'tfoot')[0];
   tfoot.style.display = '';
}
...
Those callbacks are there in order to plug your own code and perform whatever action you need to do in your application.

Email :


5 . 2012-04-11 17:03:06

piepiax wrote:

Hi Max,

 

For the second point, I suspected that it was not possible -> I change my Header

For the first point, I tried several things without succes (may be I don't know how to use correctly the on_filters_loaded function ?)

But, In the TF object, you define a variable this.nbFilterableRows = this.GetRowsNb(); that corresponds to the Lines that will be flterable (ie TBODY lines).

With this indication, I proposed that the function GetRowsNb() start from the reference Row AND Not contains the TFOOT Lines (Tr) as it's done after Fisrt filtering

Here, my GetRowsNb() function

<code>

GetRowsNb: function()
        /*====================================================
                - returns total nb of filterable rows starting
                from reference row if defined and Finished before TFOOT
        =====================================================*/

{
                var s = this.refRow==undefined ? 0 : this.refRow;
                var ntrs = this.tbl.rows.length;
                var tfootLength = 0;
                var tfoot = tf_Tag(this.tbl,'tfoot');
                if(tfoot.length > 0 ){
                        var tfootTr = tf_Tag(tfoot[0],'tr');
                        tfootLength = tfootTr.length;
                }
                return parseInt(ntrs-s-tfootLength);
        },
</code>

 

Moreover, when a TFOOT tag is present, is it possible to have a new option in order to hide the TFOOT lines ?

For example a new feature like: HideTfoot_onfiltering: true or false <- Hide TFOOT

And this feature will be compatible with rows_always_visible feature (of courseWink)

May be that my propositions are already possible via the function events but I don't know how to do that !

Piepiax

Email :


6 . 2012-04-11 13:36:08

Max wrote:

Hi Piepiax,

  1. Did you try the rows_always_visible property? Check this demo http://tablefilter.free.fr/data-types-paging-operations.htm and more specifically how the nbRows value is adjusted in the on_filters_loaded callback event
  2. Grouped headers supports COLSPAN only, at least ROWSPAN should not be used for the headers row supporting sorting feature

Email :


Top of page

29 . 2012-04-04 17:38:26

Joseph wrote:

Hey i am having an issue getting the script to sort.  I have used previous versions without problem so i am not sure what i am doing wrong.

Issue it doest not create the sort feature in any browser.  In chrome i use the debugger to see why.  It states that the tf  is not defined.  i have the var tf = setFilterGrid("demo", props) set as the last option in the list. When i type the same in the console of the debugger it starts to work perfectly.

Is there something that i missed.

Email : king DOT a DOT joe AT gmail DOT com


2 Replies

1 . 2012-04-09 15:41:57

Joseph wrote:

Thanks that did the trick.

Email :


2 . 2012-04-09 11:32:39

Max wrote:

Hi Joseph,
I think you missed something. Make sure you have downloaded a recent version of the sort extension and also be aware that the script's folder structure has changed (all files are in TableFilter directory) since v2.0.
Plese check the implementation steps on this demo page:
http://tablefilter.free.fr/filter-sort.htm

Also check all the demos using the sort feature, there are many examples:
http://tablefilter.free.fr/demos.php?1=sort

Also check the doc page, detailing all the properties of the column sorting feature.

I hope this will help you.

Email :


Top of page

30 . 2012-04-03 19:47:20

Barbara wrote:

Ok, thanks. I'll see if I can figure it out.

Email :


1 Reply

1 . 2012-04-03 19:48:42

Barbara wrote:

Oops. I meant to reply to your reply on my previous post.

Email :


Top of page

31 . 2012-03-30 00:17:20

Barbara wrote:

Hello Max,

Me again, sorry.

I was wondering if there is a way to have a text message pop up when there is no match found from selections made from the drop down menus.

Thanks in advance,

Barbara

Email :


3 Replies

1 . 2012-04-07 03:26:29

Max wrote:

The idea of having all those events callbacks is to give the possibility to plug your own code whenever an action is performed (filtering, sorting etc.). The goal is to avoid developers to change the source code in order to adapt it for their project purposes. Below an example of callbacks:

var myConfig = {
...
    on_before_filter: function(o){ alert('Implement your logic before filtering starts!!!'); },
    on_after_filter: function(o){
        alert('Implement your logic when filtering ended!!!');
        if(o.GetValidRowsIndex().length == 0){
            alert('No results.');
        }
    },
...
}

The script's public methods are listed here:

http://tablefilter.free.fr/doc_methods.php


Also have a look to the demos using those callbacks:

http://tablefilter.free.fr/demos.php?1=on_

Email :


2 . 2012-04-06 18:55:03

Barbara wrote:

I am having a hard time figuring out how to work the callback events. Is there a way I could just put an alert script somewhere in your table filter script? If so, where would it go? If too much trouble, then never mind. Thank you.

Barbara

Email :


3 . 2012-04-02 00:08:58

Max wrote:

Yes, I think so, by using some of the script's callback events.

Email :


Top of page

32 . 2012-03-29 18:16:03

irwin wrote:

Thanks for this product.  It has vastly improved some web pages of min.

One small problem.  In the options json I have: display_all_text: "-all-", and all my columns that have selects display -all- as the first and default item on the list.  However, the last item displays -all- as both the first and second item on the list.  The first -all- works as expected, restoring all the values in the column.  The second -all-acts like "search for -all-" so the column has no match and all table entries vanish.

Email : iblyahoo-example AT yahoo DOT com


4 Replies

1 . 2012-05-09 23:35:26

irwin wrote:

Thanks, Max!

I did not know I was using an ancient version.  The new version is just great.  Count me in for a donation.

Email : iblyahoo-example AT yahoo DOT com


2 . 2012-04-04 00:35:05

Max wrote:

Ok, I see you are using v1.6, which is at least 6 years old. Please upgrade to lastest version and hopefully it will be fixed.

Email :


3 . 2012-04-03 16:36:15

irwin wrote:

Max,

To clarify:

1. The value '-all-' does not appear in the column.

2. The value '-all-' appears twice in the drop down list.

3. The first '-all-' in the list acts like the '-all-' in the other columns.

4. The second '-all-' acts like a value to be matched.  So if it is selected, there are no matches.

5. This only occurs in the last column of the table.

6. You can see this at http://www.cs.odu.edu/~ibl/sum12all.html

7. The code that is generated is <option value="">-all-</option><option value="-all-">-all-</option>

Thanks,

 

irwin

Email : iblyahoo-example AT yahoo DOT com


4 . 2012-03-31 05:10:52

Max wrote:

Hi irwin,

I am not sure I understood your problem. Do you mean the option -all- appears twice? You might have the value -all- appearing in your column then...
Also, if you need to use the same value for clearing and for filtering the column I suggest to use the custom_slc_options property which allows you to define the text and the values of the drop-down filter. Have a look to the demos using this property:
http://tablefilter.free.fr/demos.php?1=custom_slc_options

This should help you to define an alternative value for the 2 -all-option.

Email :


Top of page

33 . 2012-03-14 20:13:06

Lakshmi wrote:

I am using remember_grid_values:true. But this really slows down my page. Is this a known issue? Is this because of pulling data from the cache, is there a way i could speed it up.

Thanks

Email : mathigk AT gmail DOT com


5 Replies

1 . 2012-04-13 00:44:57

Max wrote:

Hi,
Clear your cookies and try again. And also read the recommendations on this page:
http://tablefilter.free.fr/extra-large-data.htm

Email :


2 . 2012-04-11 18:33:42

lakshmi wrote:

No, I have the below filter setting

{col_0: "none",
      col_1: "none",
      col_2: "none",
      col_3: "none",
      col_5: "select",
      col_6: "select",
      col_7: "select",
      col_8: "select",
      col_10: "select",
      col_11: "select",
      col_13: "select",
      col_21: "select",
      col_29: "select",
      col_38: "select",
      col_42: "select",
      sort_select: true,
      sort: true,
      remember_grid_values: true,
      rows_always_visible: [1],
      col_number_format: [null,null,null,null,'date',null,null,null,null,'number',null,null,'number',null,'number','number','number','number','number','number','number',null,'number','number','number','number','number','number','number',null,'number','number','number','number','number','number','number','number',null,null,null,null,null]
      } 

It works really fast in Chrome and takes too long time in IE. Also Is there a script for fixed headers in this script? Thanks.

Email : mathigk AT gmail DOT com


3 . 2012-03-20 23:03:34

Max wrote:

Do you have highlight_keywords property turned on?

Email :


4 . 2012-03-20 21:44:41

Lakshmi wrote:

I have 600+ rows and 30+columns. This seems to be slow only in IE and works well in Google Chrome and Mozilla.

Email :


5 . 2012-03-19 09:51:36

Max wrote:

Hi Lakshmi,
Table data is not cached, only the filters' value. How many rows and coulmns do you have?
What takes time is parsing every cell of each row, especially if you have nested elements in your cells.

Email :


Top of page

34 . 2012-03-12 17:49:18

Joe wrote:

Hi, Nice Work!!!

I just have a question. The help button "?" doesn't work to me, it "hides" on the "Paging" row. So I can't see the block with the text.

how can I fix this so it doesn't hide there?

Email : elotro526 AT gmail DOT com


1 Reply

1 . 2012-03-13 11:32:06

Max wrote:

Thanks Joe.

Either you may decide to generate the "?" button in an another element of your page (help_instructions_target_id) or you may want to edit the css class rdiv in the filtergrid.css stylesheet, in order to enlarge the "?" button container.

Email :


Top of page

35 . 2012-03-12 16:48:31

Blas wrote:

Hi Max.

thanks for your excellent work.

I am using multiple tables on one page and everything works fine, but when I put the property grid_layout: true, then,  sort function works only in a table.

Could you, please, show me an example of multiple tables on one page with grid_layout: true   where it is possible to sort on all tables?

Thank you so much

Blas

Email : blasdeotero AT fastmail DOT fm


4 Replies

1 . 2012-03-28 13:15:19

Max wrote:

Hi again Massimo,
I don't know if you've already seen this demo, but here you have 2 tables using sort feature in the same page:
http://tablefilter.free.fr/data-types.htm

Email :


2 . 2012-03-26 12:21:37

Max wrote:

Ciao Massimo,

Please refer to the implementation steps of this demo http://tablefilter.free.fr/filter-sort.htm and also check all the demos using the sort feature, there are many examples:
http://tablefilter.free.fr/demos.php?1=sort

Also check the doc page, detailing all the properties of the column sorting feature.

I hope this will help you.

Email :


3 . 2012-03-25 07:31:24

Massimo wrote:

Hello I have the same problem with 2 tables in the same form, but do not understand what it means

Is necessary to use  "tfAdapter.sortabletable.js" in addition to "sortabletable.js".

which part of code should be changed?

Email : m DOT palmari AT hotmail DOT com


4 . 2012-03-12 19:45:40

Blas wrote:

I answer myself.

Is necessary to use  "tfAdapter.sortabletable.js" in addition to "sortabletable.js".

Thanks.

Email : blasdeotero AT fastmail DOT fm


Top of page

36 . 2012-03-06 18:14:25

Heidi wrote:

Hi Max,

I was testing my site in older IE versions (7 and 8) using the Browser Mode option in the Developer Tools of IE 9. I can only assume the issue that I am experiencing would also occur if I was truly using IE 7. GetFilteredDataCol is not returning the last row and if I check the length, it is also 1 less than it should be. IE 8 and 9 bring back the expected results. Do you have any thoughts about this?

Thank you.

Email :


1 Reply

1 . 2012-03-11 02:08:44

Max wrote:

Hi Heidi,
I tested the GetFilteredDataCol method with a 'real' IE7 and seems to be fine.
Keep me posted if you can reproduce it on older IE, my basic test was OK.
By the way, if it is a public website, could you plese provide the URL, I will add it to the references list.

Email :


Top of page

37 . 2012-03-01 23:54:35

Irina wrote:

Hello,

I'd like to use ajaxdemo.htm or ajaxdemo2.htm on my page, but I'm obviously missing something, because neither one of the scripts is working. Are there any instructions on how to implement these specific scripts?

Thanks a lot.

Email : irun4ik AT earthlink DOT net


5 Replies

1 . 2012-03-10 02:39:52

Max wrote:

Hi Irina,
What you could do is to hide the column by using the Columns Visibility Manager extension (http://tablefilter.free.fr/cols-manager.htm) and then use an external filter that filters the hidden column.

Email :


2 . 2012-03-05 22:39:52

Irina wrote:

Hi Max,

Thanks for the reply! Yes, you're right, I made a mistake. Now, when I fixed it, it shows the images.

I have another question Smile: is it possible to insert a filter but make a column that consists that info in the table hidden?

Thanks again.

Email :


3 . 2012-03-04 22:31:02

Max wrote:

Hi Irina,
You can put whatever you want in your table, there are no restrictions. Are you sure the path of the image is correct? If the image is broken, it is just a question of incorrect path...

Email :


4 . 2012-03-03 18:29:04

Irina wrote:

Please disregard all my previous posts. I understand now how to modify and use the script. I created an external grid from the example that is provided at external-grid.htm. My only question now is, is it possible to use a picture in the table and how? Below is the code that doesn't work with the script (the picture isn't showing):

<tr><td><a href="link_to_follow.html"><img src="../tumb/image.gif"></a></td></tr>

Thank you in advance.

Email :


5 . 2012-03-02 05:42:20

Irina wrote:

I've finally implemented the ajaxdemo.htm script on my page. Now, I'm looking at how I can modify this script for my needs. First of all, is it possible to add more selection boxes that will base on the previous selections? For example, if "Show G-L" was selected, I need another selection box to appear with next set of options and so on. Pressing the "Go" button after any selection should populate the table with results based on these selections. I hope it makes sense.

Also, how can I insert image in the results table?

Thanks a lot for any help.

Email :


Top of page

38 . 2012-03-01 23:17:57

Hans van Dam wrote:

Hi Max,

First of all, great work!

I'm testing the dropdown with this demo: http://tablefilter.free.fr/load-filters-on-demand.htm (under country isocode)

I would like to have something like this:

Country  Some Number (dropdown)
Angola 1,2,5,8

As you can see, I don't want multiple rows of Angola.

My question: Is it possible to make such Table, but with the  possibility do choose 1 or 2 or 5 or 8 from the dropdown list, but not 1,2,5,8 as a whole.

I thought maybe hiding tables like
Angola 1

Angola 2

Angola 5

Angola 8


(to create the posibility to choose 1 or 2 or 5 or 8 from the dropdown).

 

Thanks in advance! I'm able to make a donation of $20 if there is a solution.

Thanks again.

Email : saidwalid AT hotmail DOT com


4 Replies

1 . 2012-03-10 02:44:16

Max wrote:

Hi,
You have a "ugly" list of operators in the home page, http://tablefilter.free.fr/index.php#operators .
It is not possible at the moment to use regex in the filters.

Email :


2 . 2012-03-05 14:25:20

Hans van Dam wrote:

Thanks for your reply!

custom_slc_options did the job, the only question I have left is: Am I able to use some kind of regex in the values: [] (besides !,&&,||), or could you give me list what I can use? Because it's a bit "ugly", how it's working atm..

Thanks again for your hard work.

Email :


3 . 2012-03-04 22:45:05

Max wrote:

Hi,

You may want use the custom_slc_options property, which gives you the opportunity to define the options of your drop-down filter. Please go to the demos page, select the All tab and filter the Properties column with the custom_slc_options value. You will see the demos using this property. Also refer to this doc page: http://tablefilter.free.fr/doc.php#grid_drops

I hope this will help you in your project.

Email :


4 . 2012-03-02 00:43:35

Hans van Dam wrote:

EDIT: I'm using http://tablefilter.free.fr/external-grid.htm The external grid.

Email :


Top of page

39 . 2012-02-26 11:57:55

SenPrab wrote:

Hi,

This is a very helpful script, and everything seem to work except the Themes. May for this reason, I only get a plain table without any borders, colors. Also the rows count, help instructions, rows per page and paging - all these appear to be left aligned. I have the folders ezEditTable, TF_Modules, TF_Themes with their respective files and files filtergrid.css, tablefilter.js, tablefilter_all.js, tablefilter_all_min.js and tablefilter_min.js under the folder TableFilter. Below is the code:

<script language="javascript" src="/xxx/xxx/xxx/SiteAssets/TableFilter/tablefilter_all.js" type="text/javascript"></script>
<script language="javascript" src="/xxx/xxx/xxx/SiteAssets/TableFilter/tfAdapter.sortabletable.js" type="text/javascript"></script>
<script language="javascript" src/xxx/xxx/xxx/SiteAssets/TableFilter/sortabletable.js" type="text/javascript"></script>

//the table below contains some sample content

<table id="table1" cellSpacing="0" cellPadding="0">
<thead>
   <tr>
    <th>World Regions</th>
    <th>Population ( 2007 Est.)</th>
    <th>Population % of World</th>
    <th>% Population ( Penetration )</th>
    <th>Usage % of World</th>
   </tr>
</thead>      
<tbody>
   <tr>
    <td>Africa</td>
    <td>933,448,292</td>
    <td>14.2 %</td>
    <td>3.5 %</td>
    <td>3.0 %</td>
   </tr>
   <tr>
    <td>Asia</td>
    <td>3,712,527,624</td>
    <td>56.5 %</td>
    <td>10.5 %</td>
    <td>35.6 %</td>
   </tr>
   </tbody>   
</table>


<script language="javascript" type="text/javascript">  
//<![CDATA[  
var table2_Props =  {     
     paging: true,  
                    paging_length: 3,
     results_per_page: ['# rows per page',[2,4,6]],
     rows_counter: true,
     rows_counter_text: "Rows:",
     btn_true: false,
     btn_reset_text: "Reset",
     help_instructions_btn_text: " ",
     help_instructions_text: "",
     themes_path: 'TF_Themes/',
     btn_next_page_html: '<a href="javascript:;" style="margin:3px;">Next ></a>',
     btn_prev_page_html: '<a href="javascript:;" style="margin:3px;">< Previous</a>',
     btn_last_page_html: '<a href="javascript:;" style="margin:3px;"> Last >|</a>',
     btn_first_page_html: '<a href="javascript:;" style="margin:3px;"><| First</a>',                   
     alternate_rows: true,
     col_0: "select",
     col_4: "none",
     display_all_text: " [ Show all ] ",
     enable_default_theme: true 
    };

    
 var tf2 = setFilterGrid( "table1",table2_Props );

//]]>  
</script> 

Email : senthil DOT p DOT kaliappan AT accenture DOT com


1 Reply

1 . 2012-02-27 08:24:08

Max wrote:

SenPrab,
If you use a the default theme, remove the themes_path property from your configuration object. In any case make sure that the filtergrid.css and the TF_Default.css are imported in your page. From what I see you may define a base_path property in your config object pointing to xxx/xxx/xxx/SiteAssets/TableFilter/ (base_path: 'xxx/xxx/xxx/SiteAssets/TableFilter/') since you are pointing to /xxx/xxx/xxx/SiteAssets/TableFilter.

Email :


Top of page

40 . 2012-02-20 17:43:04

Barbara wrote:

Hi Max,

Sorry to bother you again. I know you must be really busy but I am stumped. I am ready to go live with this page but I can't seem to get the custom sort feature to work in Safari, I.E. Chrome. It only works in Firefox. I created a simple table to see if I could spot the problem but no luck. I was wondering if this sorts for you in Safari, I.E. and Chrome In the following order:

.01hz

500hz

1khz

15khz

.01mhz

1mhz

 

This is my simple table and filter grid set up:

<table id="table">

<thead>

<tr>

<th scope="col">supply voltage</th>

</tr>

</thead>

<tbody>

<tr>

<td _sortKey="m001">1mhz</td>

</tr>

<tr>

<td _sortKey="k001">1khz</td>

</tr>

<tr>

<td _sortKey="h.01">.01hz</td>

</tr>

<tr>

<td _sortKey="m.01">.01mhz</td>

</tr>

<tr>

<td _sortKey="k015">15khz</td>

</tr>

<tr>

<td _sortKey="h500">500hz</td>

</tr>

</tbody>

</table>

<script language="javascript" type="text/javascript">

var tableFilter = 

sort:true,

}

var tf = setFilterGrid("table", tableFilter)

</script>

 

Thank you in advance.....Barbara

Email :


3 Replies

1 . 2012-02-27 22:04:25

Max wrote:

You welcome...
Well, I think you exaggerated a little bit Embarassed

Email :


2 . 2012-02-23 16:21:16

Barbara wrote:

It works! You are amazing! Thank you so much!

Barbara

Email :


3 . 2012-02-22 22:42:50

Max wrote:

Hi Barbara,
I had a look to your problem, and indeed, the _sortKey attribute is actually read only by Firefox. I have a quick fix and this fix will be available in the next release of the Sortable Table extension.
So what you need to do is to open the javascript document sortabletable.js and comment or remove the following lines in the SortableTable.prototype.getRowValue function block:
...
if (typeof c.innerText != "undefined")
        s = c.innerText;
    else
...
The function should look like this:
...
SortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {
    // if we have defined a custom getRowValue use that
    if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)
        return this._sortTypeInfo[sType].getRowValue(oRow, nColumn);

    var s;
    var c = oRow.cells[nColumn];
    /*if (typeof c.innerText != "undefined")
        s = c.innerText;
    else*/
        s = SortableTable.getInnerText(c);
    return this.getValueFromString(s, sType);
};
...
By doing so all the browsers will read the _sortKey attribute inside the cell.

If you have troubles give me a sign and I will send you the amended js file.

Email :


Top of page

41 . 2012-02-16 09:00:00

hansek wrote:

How to sort numbers with commas (prices in US dollar)...??

Email : hansek AT yahoo DOT com


1 Reply

1 . 2012-02-17 07:43:41

Max wrote:

Hansek,
Please have a look to this demo showing how to achieve that:
http://tablefilter.free.fr/data-types.htm

Email :


Top of page

42 . 2012-02-15 22:09:10

Laura wrote:

Is there a way to have the paging navigation toolbar to be on BOTH the top and bottom of the grid? Currently I only have it at the top.

 

Thanks,
Laura

Email : lgrella at acquiremedia DOT com


1 Reply

1 . 2012-02-21 06:17:15

Max wrote:

Hi Laura,
Yes, you can create your own toolbar and buttons to navigate the pages and place them at desired location in your page. Have a look to this demo: http://tablefilter.free.fr/external-grid.htm to have an idea on how to  implement this.

Email :


Top of page

43 . 2012-02-14 06:22:47

qwe wrote:

Post your comment here...ffffffff

Email : qwe AT aa DOT com


0 Reply

Top of page

44 . 2012-02-13 01:33:45

Janje wrote:

Awesome script, with a couple of hours invested I've got everything working smoothly. Well, almost everything. It is slowly killing me when after filtering/searching/sorting the row colors switch positions (the first position takes the other color, and I want it to be fixed!)
Thanks for the script, hope you can help with this thingy, cheers! 

Email : oxolov AT gmail DOT com


2 Replies

1 . 2012-02-15 03:29:40

Max wrote:

Thanks Janje for your comment about the stripes.
I will have a look to it and hopefully it will be fixed in the next version(s).

Email :


2 . 2012-02-13 02:18:30

Janje wrote:

edit: I noticed that its only filtering and searching that causes the trouble, sorting just returns it to default. So the problem occurs when the first of the filtered rows is of the opposite color (to default), or to be more specific, when filters are returned to normal (or to another variant which brings the non-default first color in that position).

Email :


Top of page

45 . 2012-02-09 10:17:14

AllanG wrote:

Post your comment here...

Hi Max

I trust this is a valid question? I've a simple 10 column table which works correctly using the below script on a local machine. However, when this is placed on a windows 2008 server drive the following occurs.

Table Columns 0,1,2,3,4,5,6,7,8,9 on the local machine becomes 0,9,8,7,6,5,4,3,2,1 on the server drive.

<script language="javascript" type="text/javascript">  
//<![CDATA[  
    var table1_Props = {  
                    paging: true,  
                    paging_length: 10,  
                    btn_next_page_text: 'Next >',  
                    btn_prev_page_text: '< Prev',  
                    btn_last_page_text: 'Last >>',  
                    btn_first_page_text: '<< First',
                    col_0: 'select',
                    col_1: 'select',
                    col_2: 'select',                    
                    col_3: 'select',
                    col_4: 'select',
                    col_5: 'select',
                    col_6: 'select',
                    col_7: 'select',
                    col_8: 'select',   
                    col_9: 'none',
                    btn_reset: true,
                    sort_select: true,  
                    refresh_filters: true 
                };  
    var tf1 = setFilterGrid( "table1",1,table1_Props );  
//]]>  
</script> 

Regards

Email : allan DOT gardner AT jordanmanufacturing DOT co DOT uk


0 Reply

Top of page

46 . 2012-02-07 07:09:12

Salman A. Kagzi wrote:

Hello Max.

 

Is it possible to enforce a filter on a table from outside the generated Filter Grid using an attribtue in a TR tag?

 

For example, I have table with 10-15 rows, TF object is configured as needed and Filters are working good. Out of 15 rows in the table, 5 of them belong to a specific category and this Category type is not part of the table data (i.e. not a column but a custom attribute in TR tag). I want to control visibilty of these 5 rows using a Checkbox outside the table. Such that, when the Checkbox is checked, rows are fitered out and visible again when unchecked.

I can handle this filtering outside of the table filter using JavaScript/jQuery, but the problem is that when the Filter Grid on that table is operated, at times the hidden rows are also made visible.

Is there any way to get around this?

 

-Salman

Email : salman DOT kagzi AT gmail DOT com


1 Reply

1 . 2012-02-09 23:01:56

Max wrote:

Hi Salman,

Have you tried the rows_always_visible property? This could help you, rows defined in this array will remain always visible and then you could do show/hide them with your jQuery code.
Please refer to the doc page: http://tablefilter.free.fr/doc.php#grid_behave and to following examples using this property:
http://tablefilter.free.fr/ex.php#tbl3
http://tablefilter.free.fr/custom-data.htm
http://tablefilter.free.fr/data-types-paging-operations.htm
http://tablefilter.free.fr/url-params.htm
http://tablefilter.free.fr/columnfilters-and-singlefilter.htm

 

Email :


Top of page

47 . 2012-01-31 21:55:51

Thompa wrote:

Is it possible to have the script only load the first X number of rows, and then with paging or filtering, call the other data?  I know that this would slow down the latter actions, but it would speed up the initial load.  I've looked into ways of speeding up the page load time and have, for the time being, resorted to keeping closed/voided(an ever growing number) records on a separate page while only keeping active records(~100-150 records) on the page that is used daily.

 

Thanks!

Email :


1 Reply

1 . 2012-02-04 00:17:32

Max wrote:

Hi Thompa,
The idea of this script is to work on a HTML table, no matter how this table is generated. The script does not provide a data loading mechanism, this is simply not in the scope of this script. However you can have a look to these AJAX examples:
http://tablefilter.free.fr/ajaxdemo.htm
http://tablefilter.free.fr/ajaxdemo2.htm

and here a few tips concerning large HTML tables:
http://tablefilter.free.fr/extra-large-data.htm

Email :


Top of page

48 . 2012-01-27 17:59:48

Barbara wrote:

Hi Max,

I am almost done with my filterable table. I love this script. I just have a couple more questions (I hope).

  1. My sort images show and work properly but I can't seem to get rid of the border around my images and the question mark icon that is displaying on top of my sort images to go away.
  2. The custom sort key only works in Firefox browser. It doesn't work in I.E. (6,7,8), Opera, and Safari.

This is how I have the sort configured:

sort:true,

/*sort_images_path: 'myImages',*/

/*sort_image_blank: 'sortDefault.gif',*/

sort_custom_key: '_sortKey',

sort_config: {  

        //New sort type: 'enforceinteger'  

        sort_types:['enforceinteger','String','String','String','String','String','sortCustomKey','String' ]  

    },  

    on_sort_loaded: function(o){  

        //Add custom sort type function according to WebFx Sortable Table 1.12 script (Erik Arvidsson)  

        //SortableTable.prototype.addSortType( 'enforceinteger', o.fObj.enforceIntegerSorter );  

        //Note TF object provides a AddSortType method now  

        o.AddSortType( 'enforceinteger', o.fObj.enforceIntegerSorter );

    },  

    //Custom sorter function placed in the config obj itself  

    enforceIntegerSorter: function(val){  

        var m = val.match(/\d+/);       

        return parseInt(m[0], 10);  

    },

 

Thank you so very much,

Barbara

Email :


6 Replies

1 . 2012-02-06 17:04:23

Barbara wrote:

Hi Max,

I could change the value to M55310/08, M55310/09 to get column 7 to sort correctly but that wouldn't resolve the functionality of the _sortKey attribute. Column 6 is really dependant on the _sortKey attribute to sort correctly.

It sorts beautifully in Firefox but I can't get to work in other browsers so something must be wrong how I set up my script but I can't seem to figure out what I did wrong.

Barbara

Email :


2 . 2012-02-04 00:03:35

Max wrote:

Hi Barbara,

Have you tried to change those values to M55310/08, M55310/09 ?

Email :


3 . 2012-01-31 17:57:27

Barbara wrote:

Hi Max,

I removed the on_sort_loaded callback event and the _sortKey only works in Firfox. Not sure what I am doin wrong. Maybe there is something that I am overlooking in my table filter script. Here is the link to my test page:

www.q-tech.com/searchcrystaloscillators.html

Columns that have _sortKey are 0, 6, 7. In Firefox column 6 is sorted in the correct order of hz, kHz, MHz. Column 7 the M55310/8 and M55310/9 come before M55310/10. In other browsers it does not sort this way.

Thank you for your patience.

Barbara

Email :


4 . 2012-01-31 11:58:09

Max wrote:

Hi Barbara,

Either you use the custom sort type with the on_sort_loaded callback event or you decide to use the _sortKey attribute to sort the column (<td _sortKey="my sort value here">my text here</td>) as per the script you showed me long time ago. The script will automatically detect the _sortKey attribute and will sort the column according to its values.

Email :


5 . 2012-01-30 16:50:56

Barbara wrote:

Hi Max,

When I remove the on_sort loaded callback, the enforceinteger no longer works.

The sort_custom_key doesn't work with or without the on_sort_loaded callback except in Firefox. The sort_types I've tried for column "0" that use the _sortKey attribute are: 'sortCustomKey', 'sort_custom_key', 'String',  ''  with no luck.

Email :


6 . 2012-01-28 12:21:36

Max wrote:

Hi Barbara,
If you use a sort_custom_key, I think you don't need use the on_sort_loaded callback in order to add a new sort type. If your table cells contains the _sortKey attribute, the script will perform the sort based on the value contained in that attribute. You should remove the on_sort_loaded and the enforceIntegerSorter function from your configuration object.

Email :


Top of page

49 . 2012-01-26 07:11:19

Ofer wrote:

running on localhost, I get the following 6 warrnings and 3 errors (I do not get these error running on a remote server). I have no clue what it means:

------------------------

Resource interpreted as Other but transferred with MIME type undefined.

Resource interpreted as Other but transferred with MIME type undefined.

Resource interpreted as Other but transferred with MIME type undefined.

Resource interpreted as Other but transferred with MIME type undefined.

Resource interpreted as Other but transferred with MIME type undefined.

tablefilter.js:1045 Uncaught TypeError: Object #<Object> has no method '_PopulateSelect'

TF._AddGridtablefilter.js:1045

window.(anonymous function).arguments.callee.donetablefilter.js:902

Resource interpreted as Other but transferred with MIME type undefined. 

-----------------------------

Any help is very welcome.  

 


 

Email : ofer_yuval AT yahoo DOT com


3 Replies

1 . 2012-01-28 12:49:50

Max wrote:

Hi Ofer,
Please note this line does not belong to my script:

m.setStyle('background-image','url(/templates/site/images/style5/'+backgs[i]+')')

If you use the tablefilter.js document make sure the script can load the required js documents that are located in the TF_Modules directory, those are the modules that are loaded by the script based on the configuration object. If you have changed the location of the script directory TableFilter or its name, use the base_path property to reflect that change (base_path: 'includes/').

Email :


2 . 2012-01-27 13:29:18

Ofer wrote:

This is the error on IE debug:

Object doesn't support this property or method, tablefilter.js line 1045 character 33: 

if(!this.fillSlcOnDemand) this._PopulateSelect(i);

Email : ofer_yuval AT yahoo DOT com


3 . 2012-01-27 10:42:16

Ofer wrote:

I googled it and maybe this helps:

 

"Instead of this:

m.setStyle('background-image','url(/templates/site/images/style5/'+backgs[i]+')')

do this:

eval("m.setStyle('background-image','url(/templates/site/images/style5/'+backgs[i]+')')");

Chrome javascript gets screwed when trying to parse a variable inside an element structured with ' . In my case it stopped just before the image array being inserted. Instead of parsing the image url + image name (inside the array), it was parsing just the image url.    FF, IE and all other don't have this problem."

 

 

Email : ofer_yuval AT yahoo DOT com


Top of page

50 . 2012-01-24 14:34:59

Aydin wrote:

Hi!

Great work!

How can I enable an initial autosizing of the column-widths (dependant of the content) ?

Cheers,

Aydin

Email : akocas AT yahoo DOT de


0 Reply

Top of page

51 . 2012-01-19 17:51:11

Svante wrote:

How do I change the width of the filter cells (the text input cells)?

I want them to be of different width for each column.

Is there a code to be put in Props section?

Pointing to tablefilter_all.js? or?

Best Wishes

Svante

 

Email : svante AT henryson DOT net


4 Replies

1 . 2012-01-23 13:19:14

Max wrote:

Sorry for my previous test, I tried to post a comment from my smartphone during a travel, but did not succeed actually.
In any case, you just need to define the flt_css_class property in your configuration object, refer to this doc page:
http://tablefilter.free.fr/doc.php#grid_appear
Alternatively, you can edit directly the stylesheet called filtergrid.css

Email :


2 . 2012-01-21 09:42:40

Maxsssssggsswwshjcjc wrote:

Post your comment here...

Email :


3 . 2012-01-20 22:47:36

Svante wrote:

Excuse me Max, but your reply is empty...?

Email : svante AT henryson DOT net


4 . 2012-01-20 10:30:54

max wrote:

Post your comment here...

Email :


Top of page

52 . 2012-01-19 08:36:45

Florie wrote:

Post your comment here...

 

Thanks for the script but there is  no information on how to install it as a web based application. please help.

Email : Igbo2000 AT yahoo DOT co DOT uk


0 Reply

Top of page

53 . 2012-01-17 01:03:40

Sukh wrote:

Hello Max, thanks for this great code. I have a question, is it possible to have external and internal filters for same grid. For example:

External Filters will be (may be applied to hidden columns): [Vehical Type] [Make] [Model]

Internal filters on the resulting grid : [year][color][door] etc

Thanks for your time and effort.

Email :


2 Replies

1 . 2012-01-17 18:02:49

Sukh wrote:

Hello Max, thanks for the quick reply, i did looked at this code and it seems single filter and column filters don't work in conjuction. For testing use these values:

Single Filter: .org

Colume [id]: 66

you get 2 results devo@flexomat.com which does not have org in any fields, email or url and it shouldn't be there. could you have a look when you have time and see if i am off track. thanks

 

Email :


2 . 2012-01-17 13:29:53

Max wrote:

Hi Sukh,
I never tried before, but it should doable. Have a look to this demo to have some inspiration:
http://tablefilter.free.fr/columnfilters-and-singlefilter.htm

 

Email :


Top of page

54 . 2012-01-15 12:32:04

Pierre wrote:

col_operation + highlight_keywords bug ?

Bonjour,

félicitations pour votre travail.

Lorsque je prends votre exemple Table 7 avec Firefox 9.0.1 et que j'ajoute dans table7_Props la ligne suivante :

highlight_keywords: true, 

Si je tente le filtre suivant sur la colonne Population % of World : >10, ça fonctionne.

Si je change en >15, alors le script renvoie l'erreur : prevSib is null au niveau de la ligne 5838 de table_filter_all.js.

J'utilise table_filter 2.3.

Cordialement

Email : 8 AT santego DOT com


1 Reply

1 . 2012-01-17 13:32:41

Max wrote:

Salut Pierre,
Je vais essayer et voir s'il n'aurait pas un petit bug... J'ai touché au highlight justement dans la dernière release. Je vais poster un fix ici, ou peut-etre sortir une release.

Email :


Top of page

55 . 2012-01-09 21:36:13

Barbara wrote:

Hi Max,

Happy New Year to you.

I would like to know if it is possible to refresh filters when using custom select options.

Barbara

Email :


4 Replies

1 . 2012-01-16 16:17:43

Barbara wrote:

Oh ok. Thank you for your reply and thank you again for this wonderful script.

Barbara

Email :


2 . 2012-01-14 23:58:48

Max wrote:

Yes that's normal actually, only non custom_slc_options get refreshed, but custom_slc_options can refresh the other filters. It is quite complicated to refresh items in a custom slc containing custom searches and ranges...

Email :


3 . 2012-01-13 16:24:15

Barbara wrote:

Hi Max,

Yes. I have refresh_filters: true but only columns that are not listed in custom_slc_options get refreshed. Is there something other code that needs to be included?

Thanks

Email :


4 . 2012-01-12 21:52:17

Max wrote:

Hi Barbara,
Happy New Year to you too!
Do you mean refresh_filters along with custom_slc_options ?
From what I remember it should work.

Email :


Top of page

56 . 2012-01-03 10:21:23

Mark wrote:

Hello,

Has anyone tried to combine external search filter grid with a single search filter? I tried to instanciate 2 TF objects to achieve that, for exemple:
var tfSingle = setFilterGrid("demo", 2, { single_search_filter: true, highlight_keywords true, on_keyup: true });
var tfMulti = setFilterGrid("demo",myProps);
However, these filters do not work mutually. Actually works only tfMulti, but tfSingle works when I remove tfMulti from the code.
Maybe, is there a way to exclude one while using the other?

Email :


5 Replies

1 . 2012-01-16 15:55:46

Mark wrote:

Great thank's for your assistance!!!

Email :


2 . 2012-01-15 00:43:53

Max wrote:

This example is now in the demos page list, Programmability tab.

Email :


3 . 2012-01-12 22:12:03

Max wrote:

Sorry for the late reply, very busy lately...
I have posted an example of a double instance of the TF object at following URL:
http://tablefilter.free.fr/columnfilters-and-singlefilter.htm

I still haven't referenced this demo in the demos page.

Email :


4 . 2012-01-09 08:32:00

Mark wrote:

Ooo, thank you, Max, it would be really GREAT!!!!

Email : smukuas AT gmail DOT com


5 . 2012-01-07 19:13:52

Max wrote:

Hi Mark,
It is possible with some javascript code. If you want I can send you an example page showing how to achieve that.

Email :


Top of page

57 . 2011-12-23 08:22:33

Ofer wrote:

 10x  for the help with my previous question. , After spending some hours on it, I made some progress and got it working.

 (I am using TableFilter under Joomla).

 I noticed that TableFilter work properly when I place the TableFilter folder under the root directory.

If I place it else where , and put the right path in src="TableFilter/tablefilter.js,

it will find tablefilter.js but not the associated files (like css files).

Am I dong something wrong ? 

Email : ofer_yuval AT yahoo DOT com


2 Replies

1 . 2011-12-23 10:35:05

Ofer wrote:

Hi Mark

Thanks for the quick response. I found the base_path in the documentation.

I'll try and find out how to use it. 

 

Email :


2 . 2011-12-23 09:04:03

Max wrote:

Hi Ofer,
If you change the location of the script, use the base_path property to define the path, refer to home page and to documentation.

Email :


Top of page

58 . 2011-12-16 14:29:28

Jerome wrote:

Hi, i'm trying to use the GetFilteredData function and i'v got this weird result : 

 

tf.GetFilteredData(false).length --> 5

tf.nbFilterableRows --> 7 

 

So when i try to export datas, i always miss the two last line, wether a filter is set or no.

 

Does anybody already experience this ? 

 

Btw, thanks max for this amaizing plugin !

Email :


1 Reply

1 . 2011-12-16 15:14:34

rilax wrote:

Solved... I guess 

GetValidRowsIndex :

 

for(var k=this.refRow; k<this.nbFilterableRows; k++){

replaced by 

for(var k=this.refRow; k<this.nbFilterableRows + this.refRow ; k++){

 

Email :


Top of page

59 . 2011-12-15 18:36:55

Laura wrote:

I have been using this script for quite a while, but I have never got the sort icons to work in FF. They work in IE, but not in FF. I have the script all set up in it's own directory (tablefilter) and sortabletable.js and tfAdapter.sortabletalbe.js are in that directory, along with tablefilter.js and filtergrid.css. In filtergrid.css i have the ascending and descending arrows set as

.sort-arrow.descending{    background-image:url("TF_Themes/downsimple.png"); }
.sort-arrow.ascending{ background-image:url("TF_Themes/upsimple.png"); }

 

In IE the page loads with an indented box where the arrow goes, and when the grid is sorted, the arrows (within the box) appear. But in firefox, the grid sorts, but I cannot see the arrows.

 

I look at the html when i do the sort in firebug, The <img class changes from sort-arrow descending to sort-arrow acscending but the src stays as src="TableFilter/TF_Themes/blank.png" and never changes to the ascending or descending arrow pngs.

Any suggestions?

 

Email : lgrella at acquiremedia DOT com


6 Replies

1 . 2011-12-20 09:15:53

Max wrote:

Yes, you can define the base path in the configuration object with the base_path property, and the sort script uses this property if the assets are not in the default location.

Email :


2 . 2011-12-19 17:17:46

Laura wrote:

Thank you for all you help (now and in the past)...I had to change the basepath in tablefilter.js since my /TableFilter/ directory is under one called assets. Strange that everything else worked except the arrows. Anyway. It is working now as expected and all is good :)

Email :


3 . 2011-12-19 15:41:30

Laura wrote:

No :/ ... so that means the problem is mine. I even created a most basic page that only has a very simple table with sorting, and I still have no luck.

Email :


4 . 2011-12-18 18:52:03

Max wrote:

Do you have the same problem with the demos on this website?

Email :


5 . 2011-12-18 03:20:01

Laura wrote:

Tnanks Max. I have upgraded the sort, and the imgs are there, but still no arrows in FF. The weird thing is that it is working in IE, just not in FF.

Email :


6 . 2011-12-17 16:56:56

Max wrote:

Hi Laura,
For your information the src attribute of the image is not supposed to change, what changes is the css class applied to that image. You have upgraded lately make sure you have upgraded the sort script too. Also check the images do exist at specified location.

Email :


Top of page

60 . 2011-12-10 17:42:58

Ofer wrote:

After spendind a few hours reading and trying to get it work, I apply for help.

Is there an copmrehensive installation guide ? I couldn't find one. 

I need to know which scripts (and possibly css files) I need to link.

For example, I tried to get to copy thr Demos.htm pages, and get all the filters and styling to work, by linking tablefilter_all_min.js , filtergrid.css and ezEditTable.js, 

but I can't get it to function.

Help would be greatly appreciated !!

 

Email : ofer_yuval AT yahoo DOT com


3 Replies

1 . 2011-12-22 16:43:39

Ofer wrote:

 10x , After spending some hours on it, I made some progress and got it working.

 (I am using TableFilter under Joomla).

 I noticed that TableFilter work properly when I place the TableFilter folder under the root directory.

If I place it else where , and put the right path in src="TableFilter/tablefilter.js,

it will find tablefilter.js but not the associated files (like css files).

Am I dong something wrong ? 

 

Email : ofer_yuval AT yahoo DOT com


2 . 2011-12-12 09:10:02

Max wrote:

Hi Ofer,
To install this script refer to the implementations steps detailed in http://tablefilter.free.fr/#implement. If you want your HTML table to be editable or selectable please refer to following demo pages:
http://tablefilter.free.fr/editable-grid.php
http://tablefilter.free.fr/editable-grid-cmd.php
http://tablefilter.free.fr/selection-grid.php

All the documentation for ezEditTable is available at following website: http://edittable.free.fr/

Please note the ezEditTable script is client-side but not based on jQuery as Dante says and moreover it is implemented in such a way that it does not need a specific server-side technology to work with. Of course you will need to implement your own server-side logic in order to receive params and make DB operations(INSERT, UPDATE, DELETE)...

Email :


3 . 2011-12-11 19:32:08

Dante wrote:

aaa ... same me too for ezEditTable, but for the rest file is usefull,  i think that ezEditTable function add, edit, delete default is in client side since this is jquery, better make your own or you can ask me to build but it will cost you hehehe ...

Email : bocahsambergledek AT gmail DOT com


Top of page

61 . 2011-12-10 01:29:41

azure wrote:

hai max i have a question this filter is good but i have a task that's this plugin i think doesnt have it whiches subtraction or the opposite of SUM function example like in 1 coloumn i have records 200,300,400 so what i need is how can i have the result should be 200-300-400=-500 but not 200+300+400=900 ??

many thanks.

Email : djarumsupermezzo AT yahoo DOT com


1 Reply

1 . 2011-12-11 19:20:43

azure wrote:

never mind i have made that function substract my self with javascript help ...

Email : djarumsupermezzo AT yahoo DOT com


Top of page

62 . 2011-12-05 21:39:35

hp wrote:

Is there a way to disable sorting of some rows?  I ask because my table is setup in rows as below:

A

A1

A2

B

B1

B2

B3

C

C1

C2

 

I don't want rows A, B, and C to be sorted/filtered, only their sub rows.  I've made the sub rows hidden by default and wrote some JS to expand them when you click on the parent.

Thanks in advance!

hp

Email : hrpatel227 AT gmail DOT com


1 Reply

1 . 2011-12-07 13:26:15

Max wrote:

Hi hp,

There is no such feature available for the sorting behaviour. I don't think it would be an easy task to implement it...

Email :


Top of page

63 . 2011-11-30 20:06:18

Thompa wrote:

The script is working very well minus for one small glitch.  When I initially load the page I able able to use the page arrows to move through all the pages and the select box to do so as well.  As soon as I have sorted any column I am then only able to move to the last page and page 2.  Now this only happens when I pass "alternate_rows: true," to the script.  When I remove the alternating row colors this is no longer a problem.

This problem does not seem to occur when I am viewing example tables.

 

Any help would be appreciated!

Any idea why this is happening?  Or any known work arounds?

Email : tomjarvela AT yahoo DOT com


2 Replies

1 . 2012-02-10 18:08:02

avel wrote:

yeah, exactly

Email :


2 . 2011-11-30 20:53:09

Thompa wrote:

I'm not sure what I did but the above issue is no longer occuring.  The only thing that I can think of is that I removed 'paging: true' and have the users add it if they want it via buttons.

Email :


Top of page

64 . 2011-11-22 07:41:25

Bala wrote:

This is regarding refresh_filters option. When i have multiple drop downs to select different combinations, from different drop down list the options for current column is not getting refreshed based on the columns listed.

Please guide me to fix this problem.

 

Thanks & Regards

Bala

Email : balan DOT ranganathan AT gmail DOT com


0 Reply

Top of page

65 . 2011-11-21 16:46:09

Dan wrote:

Hello Max,

I probably found a bug in Array.tf_Has()

When I specify a custom_slc using many OR operators, using checkLists and remember_grid_values, it happens that AddChecks() calls tf_Has(), which tries to match every single value of the expression with the whole expression itself, thus returning always false.

Could you please check this? I tried to fix it but I'm still working on it.

Thank you,

d

 

Email : daniele DOT cantarini AT gmail DOT com


0 Reply

Top of page

66 . 2011-11-17 18:03:18

Willy386 wrote:

This javescript is pretty cool. I am using table 6 example and looks awesome.

But when i put the table with the script inside a layer, when i hide the layer (as an event), the controls and buttons of the table keep on showing! I just want you to know this issue in order you want to fix it. thanks bye

Email : willy386_1 AT hotmail DOT com


1 Reply

1 . 2011-11-21 13:45:16

Max wrote:

Hi Willy386,
You could use the infDiv property (refer to http://tablefilter.free.fr/doc_properties.php), that is the DOM element containing the toolbar elements, to hide the toolbar when your layer is hidden, as an example of code:

tf.infDiv.style.display = 'none'; //tf is your TF object -> tf = setFilterGrid('myTableId', myConfig);

Email :


Top of page

67 . 2011-11-16 11:24:44

problem with script wrote:

Hello,

I have a small problem with this script, is great but my problem with him is : i have a search form jquery so every time i would have different results when i use them, so when i make a search for the first time, it works well with filter and paging, but when i make another search so it's not the case, the table appears normal but without the filter options and pagination.

What is the solution in your opinion?

Email : badaoui220 AT gmail DOT com


1 Reply

1 . 2011-11-21 13:34:03

Max wrote:

Hi,
Are you using jQuery for AJAX requests? If this is the case you need to re-instantiate the TF object every time the table is refreshed (setFilterGrid(...)).

Email :


Top of page

68 . 2011-11-15 17:55:42

forestgreen wrote:

Thanks for maintaining this useful script.

Yet, I have currently problems in IE8 when I run a website with this script (using V2.2). IE8 always returns a Javascript Error, like

"Invalid Argument in tablefilter.js

Line: 2040, Code: 0, Char: 6"

The page is displayed, but the message "Loading" goes on forever. Some features like Sorting will not work then.

Has anybody experienced that as well?
Can you give me a hint, where I might go wrong or maybe what I can do about it?

The page opens and works properly in Firefox, so I assume it must be IE specific...

Email : cdg DOT forestgreen AT gmail DOT com


2 Replies

1 . 2011-11-16 14:35:01

forestgreen wrote:

Found the reason for IE throwing an error:

instead of:
        col_width: ['6%','null','4%','4%','4%','4%','4%','4%','4%','4%','4%','4%','4%','4%','5%'],

I should have written:
        col_width: ['6%',null,'4%','4%','4%','4%','4%','4%','4%','4%','4%','4%','4%','4%','5%'],

Tiny difference - big impact!

Still interesting to know that FF did not throw an error message, only IE.

Email :


2 . 2011-11-16 08:55:50

forestgreen wrote:

... and this is my configuration:


    var table1Filters = {
        grid: true,
        base_path: '../tools/tablefilter_220/',
        enable_default_theme: true,
        remember_grid_values: true,
        col_width: ['6%','null','4%','4%','4%','4%','4%','4%','4%','4%','4%','4%','4%','4%','5%'],
        sort: true,
        sort_config: {
            sort_types:['Number','none','Number','Number','Number','Number','Number','Number','Number','Number','Number','Number','Number','Number','Number']
        },
        filters_row_index: 1,
        alternate_rows: true,
        highlight_keywords: true,
        input_watermark: 'type a search text here and press ENTER',
        display_all_text: '<all>',
        paging: true,
        btn_next_page_text: 'Next >',
        btn_prev_page_text: '< Prev',
        btn_last_page_text: '>|',
        btn_first_page_text: '|<',
        rows_counter: true,
        paging_length: 1000,
        results_per_page: ['Res./page',[1000,500,200,100,50,20]],
        col_0: 'none',
        col_2: 'none',
        col_3: 'none',
        col_4: 'none',
        col_5: 'none',
        col_6: 'none',
        col_7: 'none',
        col_8: 'none',
        col_9: 'none',
        col_10: 'none',
        col_11: 'none',
        col_12: 'none',
        col_13: 'none',
        col_14: 'none',
        col_operation: {
           id: ['t1-1','t1-2','t1-3','t1-4','t1-5','t1-6','t1-7','t1-8','t1-9','t1-10','t1-11','t1-12','t1-13'],
           col: [2,3,4,5,6,7,8,9,10,11,12,13,14],
           operation: ['sum','sum','sum','sum','sum','sum','sum','sum','sum','sum','sum','sum','sum'],
           decimal_precision: [0,0,0,0,0,0,0,0,0,0,0,0,0]
            },
        btn_reset: true,
        btn_reset_text: 'Reset',
        remember_grid_values: false,
        enable_empty_option: false,
        enable_non_empty_option: false,
        help_instructions: false,
        on_filters_loaded: function(o){          
        o.GetFilterElement(0).setAttribute('title', 'select a filter criterion from the list'); //default HTML tooltip
        o.GetFilterElement(2).setAttribute('title', 'type a search text here and press the ENTER key'); //default HTML tooltip
        }
    }

Email : cdg DOT forestgreen AT gmail DOT com


Top of page

69 . 2011-11-10 17:52:47

dan wrote:

Hello Max,

thank you for your wonderful script, I like it very much.

Recently I had some trouble trying to remember_grid_values related to custom_slc_options.

Here is my configuration:

 

var table1_Props = {
    remember_grid_values: true,
    grid_layout: true,
    grid_width: '1232px',
    grid_height: '570px',
    status_bar: true,
    filters_row_index: 1,
    help_instructions: false,
    col_0: "select",
    col_1: "select",
    col_2: "input",
    col_3: "select",
    col_4: "select",
    col_5: "select",
    col_6: "select",
    col_7: "input",
    col_8: "input",
    col_9: "select",
    col_10:"none",
    display_all_text: "",
    stylesheet: globalVars.context + '/styles/css/filtergrid.css',
    sort_select: true,
    alternate_rows: true,
    paging: false,
    rows_counter: true,
    rows_counter_text: "rows: ",
    custom_slc_options: {
        cols:[6,7,8],
        texts: [langArray.arrayValue,
                ambArray.arrayValue,
                dbArray.arrayValue],
        values: [langArray.arrayKey,
                ambArray.arrayKey,
                dbArray.arrayKey],
        sorts: [true,true,true]
    },
    left_div_css_class: 'ldivcssclass',
    middle_div_css_class: 'middledivcssclass',
    sort: true,
    base_path: globalVars.context + '/scripts/TableFilter_EN/TFExt_SortableTable/',

    col_width: ['261px', '56px', '140px', '79px', '168px', '100px', '103px', '87px', '85px', '65px', '18px'],
    on_keyup: true,
    on_keyup_delay: 1000,
    selectable: false,
    editable: false
};

Simply the values associated to filters on columns 6, 7 and 8 aren't remembered. What do I miss?

Thanks again

d

Email : daniele DOT cantarini AT gmail DOT com


2 Replies

1 . 2011-11-15 16:30:41

dan wrote:

Hi Max,

thank you for your reply.

I corrected filter types for columns 6,7 and 8 into select. But still the values aren't remembered.

Consider that i need to filter concatenated values, like 'foo, bar, foobar, etc' using single values (e.g.: foobar)

so my filter values look like this: '=foobar || {foobar,  || *, foobar,  || }, foobar'

Thank you in advance

Email :


2 . 2011-11-10 21:11:25

Max wrote:

Hi Dan,
Maybe is because you first define col_7 and col_8 as 'input' types and then you use them with this inappropriate type in the custom_slc_options, those filters should be of 'select', 'multiple' or 'checklist' type.
Once you have changed that, clear the cookies of your browser and hopefully it should work again...

Email :


Top of page

70 . 2011-11-10 17:33:22

olivier wrote:

It seems that "select" filter bugs when "TableFilter" dir is not at the same level as the HTML page.

I have written a simple test with the following tree:

./test.html
./TableFilter (TableFilter dir as downloaded)
./TMP (empty dir)

test.html code:

<!DOCTYPE html>
<html lang="fr-fr" class="no-js"><!-- no-js need it for modernzr -->
  <head>
 
     <link href="TableFilter/TF_Themes/MyTheme/MyTheme.css" rel="stylesheet" type="text/css" />
     <script src="TableFilter/tablefilter.js" type="text/javascript"></script>

  </head>
<body>
<br \>
<table cellpadding="0" cellspacing="0" id="table_demandes_ouvertes_id" name="table_demandes_ouvertes_name"><tr><th><b>Numéro de demande</b></th><th><b>Auteur</b></th><th><b>Demandeur</b></th><th><b>Etat</b></th><th><b>Date Début</b></th><th><b>Date Fin</b></th><th><b>Jours</b></th></tr><tr><td>3</td><td>PHA</td><td>GCH</td><td>demande</td><td>11-10-2011</td><td>13-10-2011</td><td>2.5</td><td><form action="editer_demande" border="1" enctype="multipart/form-data" method="POST"><input name="editer" src="../static/images/editer.png" type="image" value="Editer" /><input name="editer_demande_id" type="hidden" value="3" /><input name="editer_redirection" type="hidden" value="" /></form></td><td><form action="valider_demande_par_dir" enctype="multipart/form-data" method="POST"><input name="valider" src="../static/images/ok.png" type="image" value="Valider" /><input name="validerParDir_demande_id" type="hidden" value="3" /><input name="validerParDir_redirection" type="hidden" value="" /></form></td><td><form action="annuler_demande" enctype="multipart/form-data" method="POST"><input name="annuler" onclick="return prompter();" src="../static/images/annuler.png" type="image" value="Annuler" /><input name="annuler_demande_id" type="hidden" value="3" /><input name="annuler_redirection" type="hidden" value="" /><input id="annuler_commentaire_id" name="annuler_commentaire" type="hidden" /></form></td></tr></table>

<script type="text/javascript">
var table2_Props =  {                    
                    col_0: "select", 
                    col_4: "none", 
                    display_all_text: " [ Show all ] ", 
                    sort_select: true 
                }; 
setFilterGrid("table_demandes_ouvertes_id",table2_Props);
</script>   
  </body>
</html>

 

Right now, test.html filters works well.

Now move TableFilter dir in TMP, add 'TMP/' to files path in test.html: "select" type filter now goes wrong...

Email : olivier DOT les AT gmail DOT com


2 Replies

1 . 2011-11-14 10:28:25

olivier wrote:

Thank you for the answer. It is working good now.

Great job, thanks and keep going ;)

Email :


2 . 2011-11-10 20:53:03

Max wrote:

Hi Olivier,
If you import in your page a version of the script >= 2.0, use the base_path property in your configuration object to define the exact location, this is important especially when you use the tablefilter.js document, which imports automatically only the modules required by the config object (as opposed to tablefilter_all.js whichcontains all the modules in one document). Refer to comment below or above to see an example.
I hope this helps.

Email :


Top of page

71 . 2011-11-07 07:41:43

Shan wrote:

Hi

I've few issues.

1) I have a table that have multi level heading(grouped heading) and colums are morethan 50

can you please give me how to filter the grouped column . I need

 

Email : shan1016pdp AT gmail DOT com


1 Reply

1 . 2011-11-07 13:46:06

Max wrote:

Hi Shan,
Please use the numeric parameter of the setFilterGrid function to tell the script from which row the filtering process should start (var tf = setFilterGrid('myTableId', 4, myConfig);). Refer to the home page: http://tablefilter.free.fr/#implement
The script cannot filter grouped columns, only individual columns, or eventually a single filter for all the columns.

 

Email :


Top of page

72 . 2011-10-21 15:49:22

Greg wrote:

Just discovered a strange Performance related behavior with the filter script v2.2, and probably previous versions as well.

I have a table with 84 rows and about 25 filter columns.

When I load up the page, the very first filter action I do on the table completes in less than 1 second.  Yay!

Every subsequent action takes approximately 8 seconds =(

E.G. If I click "Clear Filters" after a page reload, it's done very quickly.  If I click it again, it takes ages =(

E.G. #2)  If I click one of my checklist filters after a page reload, it's done in <=1 second.  Click the filter again and it takes 8 seconds.

This test was done in IE.

Using Chrome I witness the same behavior, just a bit faster ;)

I am using tablefilter_min.js with no sorting or edittable modules.  Here's my Props var in case it helps:

var tfProps = {
base_path: '/js/tf/',
rows_counter:true,
rows_counter_text: "Displayed rows: ",
loader:true,
loader_text: "Please Wait...",
filters_row_index: 1,
popup_filters:true,
on_keyup: true,
on_keyup_delay: 500,
highlight_keywords: true,
mark_active_columns:true,
  col_1: "checklist",col_2: "checklist",col_3: "checklist",col_4: "checklist",col_5: "checklist",col_6: "checklist",col_7:"checklist",col_8: "checklist",col_9: "checklist",col_10: "checklist",col_11: "checklist",col_12:"checklist",col_13: "checklist",col_14: "checklist",col_15: "checklist",col_16: "checklist",col_17:"checklist",col_18: "checklist",col_19: "checklist",col_20: "checklist",col_21: "checklist",col_22:"checklist",col_23: "none",col_24: "none",col_25: "none",col_26: "none",col_27: "none",col_28:"none",col_29: "none",
display_all_text: "(All)",
status_bar: true,
status_bar_target_id: 'mdiv_keyspec',
btn_reset: true,
btn_reset_text: "Clear",
btn_reset_html: '<input type="button" value="Clear Filters" class="reset" title="Clear Filters"/>',
help_instructions_btn_text: 'Help',
help_instructions_btn_html: '<input type="button" value="Help" class="helpBtn" title="Filter Help"/>',
help_instructions_html: '<p>Use the filters <img src="js/tf/TF_Themes/icn_filter.gif" alt="Filter" title="Filter">at the top to view parts with specific attributes</p><p>Click the "Clear Filters" button to the right to reset all filters</p>',
};

Email :


2 Replies

1 . 2011-10-24 09:07:12

Max wrote:

Hi Greg,
Thanks for your precise tests concerning the filtering process. Actually, your concern about the keywords highlighting is an old issue and I must admit, this item is in my todo list since ages Frown. At the moment, I don't have time to dedicate to this project, unfortunately sigh... But I will try to optimise this feature hopefully in the next release(s)...
Maybe those functions could be optimised by using regular expressions instead of DOM iteration, which seems to be a time consuming job for browsers, especially IE...

Email :


2 . 2011-10-21 16:25:48

Greg wrote:

Turns out to be the "highlight_keywords:true" feature that causes this long delay.

I believe the call to UnhighlightAll() in _Filter() causes the performance issue, and so I've disabled it.

Thanks for all your effort on this project!!

Email :


Top of page

73 . 2011-10-20 07:04:01

Dipen wrote:

Hi Guys,

 

I have table with 25 columns. i can able do all the setting in that table except the column scroll.. if i give the layout  configuration as grid_layout:true then the scroll is working if i turn it off then the scroll is not coming.

 

Another case . if i set grid_layout:true then the filter clear and Hide/Show Column comes at the bottom of the table.. it needs to be top of the table. Please gimme some advice to attain these

 

Thanks guys

Dipen Baskaran

Email : dipen10 AT gmail DOT com


0 Reply

Top of page

74 . 2011-10-19 09:17:38

Spanish string in cell value not displayed correctly wrote:

HI

I have implemented the tablefilter and its working fine for the past one year. But now we have a enhancement that we should support multiple languages. Now when there are spanish text in the cell value like "Más búsqueda" its displayed as "M?b?da" spanish text "seleccionará" as seleccionar?/td>. Now what i do to enable thetable grid to display multiple language text and make it sortable.

Thanks in Advance

Daniel

 

Email : daniel DOT elavarasan AT gmail DOT com


1 Reply

1 . 2011-10-20 17:21:17

Max wrote:

I guess you need to specify the language at page level, it does not concern the HTFG script itself:
...
<meta http-equiv="Content-Language" content="es" />
...

 

Email :


Top of page

75 . 2011-10-17 12:01:43

marcd wrote:

well, possibly a stupid question... but:

I have an internal webportal with many tablefilter grids with search and filter possibilities.

my problem: how to clear all filters on load? (for example at onload="..." property, or in init() )

I tried to add {mygrid}.ClearFilter() but then I get an error...

Any tips how to reset filter each time invoked?

thank you in advance.

Email : marc DOT deml AT gmx DOT net


2 Replies

1 . 2011-10-20 10:51:57

marcd wrote:

hmm, sounds to be a good idea... I should really read the documentation.... ;)

Email : marc DOT deml AT gmx DOT net


2 . 2011-10-18 17:58:15

Max wrote:

Hi Marcd,
I have possibly a stupid question too Wink: Why do you need to clear the filter values at page load? If filters have values at page load, it means that the remember_grid_values is on. Why don't you disable it?

Email :


Top of page

76 . 2011-10-03 19:14:01

Barbara wrote:

Hi Max,

Ok, I'm back on this project. I don't quite understand the custom_slc_options. On your example you show how to customize a number range. I have cells that have multiple text and some that have single text. I have put the text value that I want to show in the drop down menu, however, I don't know what to do for the value.

What I am trying to accomplish is to filter the text value whether it is in a cell by itself or within a cell that has multiple text. For example, if a user selects "CMOS" in the pull down menu, it will filter cells that have only "CMOS" as well as cells that have other text  (i.e. "CMOS, ACMOS, HCMOS).

Here's what I have done so far but it doesn't work.

 

custom_slc_options: {  

cols:[4],  

            texts: [['CMOS','ACMOS','HCMOS','LVHCMOS','LVDS','ECL','PECL','LVPECL','TTL','SINE']],  

            values: [  

                        ['CMOS && ACMOS, CMOS, HCMOS, LVHCMOS, TTL, && ACMOS, CMOS, HCMOS, LVHCMOS, TTL, ECL/PECL','ACMOS','HCMOS','LVHCMOS','LVDS','ECL', 'PECL','LVPECL', 'TTL', 'SINE WAVE' ]  

                    ],  

            sorts: [false]  

        },

 

Hope I am making sense.

Thanks .. Barbara

Email :


12 Replies

1 . 2011-10-17 16:48:02

Barbara wrote:

Hi Max,

I pasted the script you just provided and now it filters cells that only have multiple text. I commented out column 4 on the custom_slc_options because I wasn't sure if I was to include the custom_slc_options for column 4 along with the custom_cell_data for column 4. When I included custom slc for column 4 with the custom cell data, it filtered the same as before.

I uploaded both versions so you can get an idea what I mean:

http://www.q-tech.com/searchCrystalOscillators.html

http://www.q-tech.com/searchCrystalOscillatorsCommented.html

Please forgive me, I know nothing about javascript (just copy, paste and modify).

Thank you for your advise on the comma at the end of the on_after_filter function. I was wondering why the table filter wasn't working in i.e. 6 and 7. It worked ok on i.e. 8. Now it works on all 3 thanks to you.

Barbara

Email :


2 . 2011-10-16 12:14:29

Max wrote:

Barbara,
You could use the custom_cell_data delegate function to retrieve the cell data according to your needs, in your case it could be something like:
...
    custom_cell_data_cols: [4],
    custom_cell_data: function(o,c,i){
        var cellText = tf_GetNodeText(c).replace(/(\r\n|\n|\r)/gm, ''); //remove linebreaks for IE
        cellText = ' '+cellText;
        var filterValue = o.GetFilterValue(i).substring(1, o.GetFilterValue(i).length); //remove operator *
        if(cellText.split(',').length > 1){ //multiple values
            if(cellText.split(' '+filterValue).length>1) return cellText;
            else return '';
        } else{ //single value
            if(o.__containsStr(filterValue, cellText, null, true)){ return cellText; }
            else return '';
        }
    },
...
Please note that you forgot to remove the ',' characther in your last property:
...
on_after_filter: function(o){           
...       
},
...
This is could generate a javascript error with some browsers (IE)

Email :


3 . 2011-10-13 16:08:00

Barbara wrote:

Hi Max,

Yes now the other columns with custom select are working beautifully. Thanks so much. I uploaded the page with the correct syntax.

If you have any suggestions on how I can get column 4 (Logic Type) to search only the whole word within a cell that have multiple text that would be great.

Now I will tackle the other columns.

Again, thank you very much ....

Barbara

Email :


4 . 2011-10-12 21:28:27

Max wrote:

I had a quick look to your URL and I have the impression from the lines you commented out that the syntax is not correct for the custom_slc_options. In case this is the problem, below the syntax for multiple columns:
...
custom_slc_options: { 
    cols:[0, 4, 7], 

    texts:[        ['QT1','QT3','QT4','QT6','QT10','QT21','QT22','QT24','QT25','QT26','QT28','QT39','QT41','QT48','QT50','QT62','QT66','QT70','QT71','QT78','QT81','QT82','QT83','QT84','QT88','QT89','QT90','QT92','QT93','QT122','QT128','QT178','QT188','QT190','QT192','QT193','QT606','QT625','QT641','QTV701','QTV702','QTV704','QTV705','QTV706','QTV711','QTV712','QTV714','QTV715','QTV716','QTV721','QTV722','QTV724','QTV725','QTV726','QT725','QT801','QT802','QT804','QT805','QT806','QT811','QT812','QT814','QT815','QT816','QT821','QT822','QT824','QT825','QT826'],
['CMOS','ACMOS','HCMOS','LVHCMOS','LVDS','ECL','PECL','LVPECL','TTL','SINE WAVE'],
['B+','High Reliability','MIL-PRF-55310 (Military)','MIL-PRF-55310 (Space)','Space']
    ], 

    values: [ 
['QT1 || QT1C || QT1T','QT3 || QT3C || QT3T','QT4T','QT6 || QT6C || QT6HC || QT6T || QT6T w/Gate || QT6V','QT10C || QT10T','QT21','QT22','QT24 || QT24T','QT25','QT26','QT28','QT39E','QT41 || QT41HC','QT48E','QT50','QT62 || QT62T','QT66 || QT66HCD || QT66T','QT70','QT71','QT78 || QT78HCD || QT78LD || QT78TD','QT81','QT82','QT83','QT84','QT88 || QT88HCD || QT88LD || QT88ND || QT88RD','QT89','QT90','QT92 || QT92HCD || QT92LD || QT92ND || QT92RD','QT93', 'QT122','QT128','QT178','QT188','QT190','QT192','QT193','QT606C || QT606L','QT625C || QT625L','QT641C || QT641L','*QTV701','*QTV702','*QTV704','*QTV705','*QTV706','*QTV711','*QTV712','*QTV714','*QTV715','*QTV716','*QTV721','*QTV722','*QTV724','*QTV725','*QTV726','*QT725','*QT801','*QT802','*QT804','*QT805','*QT806','*QT811','*QT812','*QT814','*QT815','*QT816','*QT821','*QT822','*QT824','*QT825','*QT826'], 
['*CMOS', '*ACMOS', '*HCMOS', '*LVHCMOS','*LVDS', '*ECL', '*PECL', '*LVPECL', '*TTL', '*SINE WAVE'],
['B+', 'High Reliability', 'M55310/8 || M55310/9  || M55310/10 || M55310/11 || M55310/12 || M55310/13 || M55310/14 || M55310/15 || M55310/16 || M55310/17 || M55310/18 || M55310/19 || M55310/20 || M55310/21 || *M55310/25 || *M55310/26 || M55310/27 || M55310/28 || M55310/29 || M55310/30 || M55310/33 || M55310/34 || *M55310/35 || *M55310/36 | M55310/37 || M55310/38 || M55310/39 || *M55310/40', 'M55310/16', 'Space' ] 
    ],

    sorts: [false, false, false]
},
...

Email :


5 . 2011-10-11 18:55:09

Barbara wrote:

Hi again,

This is what I have so far using the origin "*" code you gave me.

www.q-tech.com/searchCrystalOscillators.html

Column 4 (Logic Type)

I also used custom_slc_options on columns 0, 7 but then column 4 doesn't work anymore so I commented them out.

Email :


6 . 2011-10-11 16:31:01

barbara wrote:

Hi Max,

Ok, I replaced * with = and the search results show only cells that give only the "CMOS" option. It excludes the cells that list multiple options "CMOS, ACMOS, HCMOS ... etc". The * operator is getting close to how I would like to filter this column. I guess I could try the || operator again but that will be a lot of words to list in the values for each text listed in the pull dow menu.

Have any more suggestions?

 

Thanks,

Barbara

Email :


7 . 2011-10-11 08:52:44

Max wrote:

Ok, try the exact match operator then: '=CMOS', '=ACMOS' etc.

Email :


8 . 2011-10-10 21:57:55

Barbara wrote:

Hi Max,

I copied and pasted the script that you provided and it works now however the code also filters the search term that is found within a whole word. For example if the search term is "CMOS" it will also include "ACMOS", "HCMOS", etc. Is there a way around this?

I didn't use the OR operator because it was getting too complicated for me. Too long for me to explain. I think the script you provided is pretty close to how I would like it to sort.

Also, I was wondering if there is a way to filter columns with number/alphabet combination using the same principle as the enforceinteger in the sort function.

Thank so much,

Barbara

Email :


9 . 2011-10-08 11:48:23

Max wrote:

Hi Barbara,
The syntax is not correct. Try to use operators instead, listed in the home page. Below an exemple with your values:
...
custom_slc_options: { 
    cols:[4],
    texts: [['CMOS','ACMOS','HCMOS','LVHCMOS','LVDS','ECL','PECL','LVPECL','TTL','SINE']],
                values: [['*CMOS', '*ACMOS', '*HCMOS', '*LVHCMOS','*LVDS', '*ECL', '*PECL', '*LVPECL', '*TTL', '*SINE']], 
    sorts: [false]
        },
...

If you need to filter by multiple terms use the OR operator || instead of && :
'*CMOS || *LVDS'

I hope this will help you.

Email :


10 . 2011-10-07 23:03:21

Barbara wrote:

Hi Max,

No, it doesn't work for me. Does it look right? Am I headed in the right direction?

Barbara

Email :


11 . 2011-10-07 19:02:38

Max wrote:

Hi Barbara,
Does this work?

Email :


12 . 2011-10-03 21:18:21

Barbara wrote:

Sorry, I found errors in my code so I redid. Here is the corrected version.

 

cols:[4],  

            texts: [['CMOS','ACMOS','HCMOS','LVHCMOS','LVDS','ECL','PECL','LVPECL','TTL','SINE']],  

            values: [  

                    ['CMOS && ACMOS, CMOS, HCMOS, LVHCMOS, TTL', 'ACMOS && ACMOS, CMOS, HCMOS, LVHCMOS, TTL', 'HCMOS','LVHCMOS','LVDS','ECL', 'PECL','LVPECL', 'TTL', 'SINE WAVE' ]  

                    ],  

            sorts: [false]

        },   

 

 

Barbara

 

Email :


Top of page

77 . 2011-09-30 12:30:31

forestgreen wrote:

Another interesting observation I made today:

I ran the 1.99 Version of the tablefilter toolkit until today. I tried to upgrade to V2.10 and everything looked good apart from sorting. Sorting with 2.10 works obviously only in IE (tested with 8.02) but not in Firefox (tested with 6.02 and 7.02).

Under V1.99 sorting works also with FF 6.02 and 7.02. So I downgraded to V1.99 in order to stay compatible with my users.

Did other users make the same observation?

 

Email : c_d_g AT web DOT de


1 Reply

1 . 2011-09-30 14:12:33

Max wrote:

Hi forestgreen,
When you upgraded to V2.1, did you upgrade the sorting script too?
Actually the script's folder organization has changed, all the documents are now located in the Tablefilter directory and imported script paths need to be changed accordingly in your page, if any.

Email :


Top of page

78 . 2011-09-30 11:51:03

forestgreen wrote:

Again, I would like to express my gratitude for this script toolkit!

One question which I could not find an answer to is how to apply a mouseover text effect on the text search input field. Our users dislike the watermark text option but instead like to have a hint how to input the search criteria in a text bubble which pos up when the mouse is moved over the search text input field.

I am familiar with how to create mouseover effects in HTML, but I cannot figure out to which object I shall apply this as the whole input row is not static but instead created dynamically by the script itself.

Is that possible?

Email : c_d_g AT web DOT de


1 Reply

1 . 2011-09-30 18:27:57

Max wrote:

Hi again,
Here you have an exemple showing how get the filter DOM element and apply a title attribute to it and also add a onmouseover handler for your custom tooltip:

var tfConfig = {
...
    on_filters_loaded: function(o){           
        o.GetFilterElement(0).setAttribute('title', 'hello world'); //default HTML tooltip
        tf_AddEvent(o.GetFilterElement(1), 'mouseover', function(e){ alert('filter 1 is hovered'); }); //mouseover custom tooltip here
    },
...
};

In short, once the filters are generated (on_filters_loaded), you get the filter DOM element with the GetFilterElement(colIndex) public method and apply the handlers you need (onmouseover, onmouseout et.)

Email :


Top of page

79 . 2011-09-29 21:28:24

Heidi wrote:

While I have figured out much of this script using the documentation and examples, I am having an issue with extracting sorted and filtered data from the table and hope you can help me figure out my problem.  I always get the same set of row (numbers) returned from GetValidRowsIndex(), regardless of whether I have filtered and/or sorted any data, so these indexes seem to be the initial row numbers. When I call GetFilteredDataCol(), the returned data matches up with what is showing in the displayed table if I have only filtered the data. Once I sort it, the data returned by GetFilteredDataCol() is no longer the same (either in content or order) as what is showing in the displayed table. How do I extract filtered and sorted table data so that it matches the displayed table? Thank you very much for sharing and for you help!

Email : milesparkerb AT gmail DOT com


5 Replies

1 . 2011-10-09 21:39:48

Max wrote:

Hi Heidi,
A quick message just to tell you that I have released a new version v2.2, it should be ok now. The public methods should return correct data when the table is sorted.

Email :


2 . 2011-10-05 09:01:44

Max wrote:

Hi Heidi,
I am happy to see that you work on a workaround Smile!
Do you mean to filter the table? If yes, use the Filter() method to do so.

Email :


3 . 2011-10-04 21:18:48

Heidi wrote:

Max, after some quick additional testing, it seems like it works okay if the sort is done BEFORE any filtering. I don't know if that makes sense with the current logic, but if I can verify that, I'm thinking that I could do the following: on_before_sort would call a function to call GetFiltersValue and save them and then clear the filters. on_after_sort would call a function to call SetFilterValue for each one that was saved . After I SetFilterValue, how do I get those to take effect without another call to setFilterGrid or is that the only way? Thanks!

Email :


4 . 2011-10-04 20:56:13

Heidi wrote:

Thank you for your response. At least I know I'm assessing things accurately and not doing something wrong. I'll just have to disable sorting for now.

Email :


5 . 2011-10-04 13:42:51

Max wrote:

Hi Heidi,
I made some quick tests and those methods do not take into account the sorting behaviour indeed. Those methods work as long as the table is not sorted. I will try to correct this in the next release, hopefully, for the moment I don't see any workaround...

Email :


Top of page

80 . 2011-09-28 23:45:54

Greg wrote:

Great script Max!!  This has saved me a lot of time.  Thank you for sharing your hard work.

I have run into a couple issues I would like to report to you.

1) Regarding Refresh Filters:True.   It works great, but I ran into an issue when using this with the on_keyup and multiple select box.   Let's say I have a multi select box with options A, B, and C.  If I select option B, refresh_filters will hide options A and C!    This makes multiple and checklist filters generally incompatible with Refresh_Filters property.    It would be ideal if Refresh_filters only limited the options of *other* filters.   So If I had say 3 columns with 3 multiple or checklist filters, then the filter for Column 1 should only limit the options of the the Column 2 and 3 filters.    Column 2 filters should limit the options of Column 1 and 3,  etc.  Essentially a filter option should not be applied to itself when calculating the Refresh_Filters options, only to the other filters.

Depending on how you have this coded, it may be too much work to make this change.

Another cool option would be have Refresh_Filters "Grey out" the incompatible options instead of hide them completely.

2) The script doesn't handle rowspan (probably not colspan either).   I doubt it is worth the trouble of addressing this limitation, but thought I'd pass it along in case you weren't aware of it.  (I had a two row table header with some columns spanning both rows and the script puts the filters in wrong place.   Tested a rowspan in the data portion and saw filtered results getting shifted by a column.    Not a big deal, I have worked out another method to suit my layout needs.

Email : ghardy AT vcamerica DOT com


5 Replies

1 . 2011-10-21 22:50:06

Max wrote:

Kay,
The setFilterGrid method accepts a numeric paremeter that defines from which row starts the filtering process:
http://tablefilter.free.fr/#implement

Email :


2 . 2011-10-18 10:27:29

Kay wrote:

Hi,

on 2) i´ve had the same Problem, i just wont to use 2 head rows AND switch the filter grid on, so that the solution with the additinal rows not works.

an example of the table what i mean
TH_Area1 - TH_Area2
TH_Col1TH_Col2TH_Col3TH_Col4TH_Col5 - TH_Col7TH_Col8
data data data data data - data data
data data data data data - data data


i think that this model is not realy unusual.
after reading the DOCs and check the samples i found no solution to do that.
so i check the tablefilter_all.js code and found the right point to fix that problem.
after this correction u are able to use however head rows u want, the head row with the filters are ever the LAST! head row.
u can use the filter grid, while my fix is q&d u can only switch the filter row between onTop and after the first head row.
i think it is helpfull to implement an config property for that, but its not realy easy.

search this (~row 750)

    _AddGrid: function()
    /*====================================================
        - adds row with filtering grid bar and sets grid
        behaviours and layout
    =====================================================*/
    {
        if(this.hasGrid) return;
        if(this.gridLayout) this.refRow = this.startRow==undefined ? 0 : this.startRow;
        var thead = tf_Tag(this.tbl,'thead');
           this.headersRow = thead[0].rows.length-1 + (this.fltGrid ? 1 : 0 );

        var f = !this.fObj ? {} : this.fObj;

the bold lines are to add, the first one is new, the secone line is to change
the old entrie is "this.headersRow = (this.filtersRowIndex==0 && this.fltGrid) ? 1 : 0;".

if u use the "tablefilter.js", u have to replace the code there too (~row 939).

have fun
Kay

Email :


3 . 2011-10-03 14:03:34

Max wrote:

Hi again Greg,
There is always room for optimisation and it would be great to have a faster filtering process! This is completely open source (MIT license) so you can change this code and share it for the benefit of all. Give me a sign if you implement this optimisation, I will be delighted to release it Smile.

Email :


4 . 2011-10-02 00:06:34

Greg wrote:

Max,

  Thanks for your response.  Rowspan support is certainly not worth bothering with - very difficult and very little reward.

  I took a glance at the filter code after noticing that the script takes a very long time to apply filters on some decent sized tables.  (e.g. ~200 rows, 15 columns with filters)

  It appears that your filter function is redoing all filters/highlights every time a filter is changed.   The script would scale (performance-wise) much better if it were able to only hide rows based on the one filter that gets modified. Obviously this is a more complex algorithm to code.

 The "Clear Filters" button could also speed up with a special simple function that clears all the filter values and then unhides all rows.

  These are suggestions that I think would greatly speed up the javascript processing time of the tablefilter script.

  Keep in mind I am a C firmware programmer by trade, and haven't produced any significant javascript so please  rely on your expertise and take these comments with a grain of salt  :)

  Once I get this web site up and running, I may take a swipe at modifying the filter functions this way - and of course provide you with the code if I can make it work...   Would that be ok with you and your licensing?

Email : ghardy AT vcamerica DOT com


5 . 2011-10-01 21:33:36

Max wrote:

Hi Greg,
Thanks for your valuable comments. Concerning the refresh_filters, the grey out option is already coded, it will be available in the next version hopefully. I will have a look to see if it is a big deal to leave all the options of the 'master' filter, I am not sure about it.
Concerning the rowspans, the script does not handle them at all, I haven't tested them, I dont even know if it is all disrupted actually...
In any case thanks for your interesting feedback! 

Email :


Top of page

81 . 2011-09-24 14:39:17

Harry wrote:

How can i use multiple extension like column resizer and columns visibilty etc,  for a single table,

and when i use

results_per_page: ['# rows per page',[5,10,20,50,100]],

sort: true,

paging: true,
paging_length: 5,

the script always sorts to the default number of rows that is 5 even if i select 50 rows.

Email : hsirahp AT gmail DOT com


1 Reply

1 . 2011-09-25 12:36:56

Max wrote:

Hi Harry,
Thanks for pointing out this bug concerning the sort and results per page features. It is hopefully fixed now, you just need to download the sorting script v1.8: http://tablefilter.free.fr/dwn.php and install it again in your project.
Below an example of how to load multiple extensions in the configuration object:
...
        extensions: {   
            name:['ColsVisibility', 'ColumnsResizer'],
            src:['TableFilter/TFExt_ColsVisibility/TFExt_ColsVisibility.js', 'TableFilter/TFExt_ColsResizer/TFExt_ColsResizer.js'],
            description:['Show/hide columns', 'Columns Resizing'],
            initialize:[function(o){o.SetColsVisibility('ColsVisibility');}, function(o){o.SetColsResizer();}]
        },
...

Email :


Top of page

82 . 2011-09-20 15:25:42

marcd wrote:

Hello.

I get an error in IE9 in tablefilter.js in line 3208
"rows: object is null or undefinded"

in FF debug I get same error "this.tbl is null" here

var tr = (rowIndex == undefined) ? this.tbl.rows[0] : this.tbl.rows[rowIndex];


any help? I cannot find the problem... please bring a spark of light in my darkness...

 

Email : marc DOT deml AT gmx DOT net


4 Replies

1 . 2011-09-23 11:40:28

Max wrote:

Hi Steve,
I don't have enough information to have an idea. Please post your configuration object or send me a html page reproducing the bug (no server-side page or server-side code in the page) to email below.
Thanks

Email : tablefilter AT free DOT fr


2 . 2011-09-22 09:22:27

Steve wrote:

Hy there!

My script html tag is :

<script src="TableFilter/tablefilter_all_min.js" language="javascript" type="text/javascript"></script>

and all the files are on the TableFilter folder from the zip...

I still can't get it work... same error as mentioned before...

Email :


3 . 2011-09-21 23:37:17

Max wrote:

Hello everyone,
In version 2.1 all the script's files are contained in a TableFilter folder. Did you change the script path in your page?
<script src="TableFilter/tablefilter.js" language="javascript" type="text/javascript"></script>

Email :


4 . 2011-09-21 14:38:43

Steve wrote:

Hi everybody!

I got a same issue as marcd mentioned, please help us find a solution, i use script version 2.1, Firefox 6.0.2

I used the same script without any problem on one page, but i can't make it work in another one...

Thanks for any help!

Email :


Top of page

83 . 2011-09-11 22:36:26

Larry wrote:

Hi!

Is it possible to hide some of the words in a colomn so it doesnt get filtered?

Thanks in advanc,

 

Larry

 

Email :


5 Replies

1 . 2011-09-27 13:38:20

Max wrote:

Hi Larry,
I don't understand exactly what you need to do... The filters show the values of the column and if you need to change those values or filter those values with your own logic, then the custom_cell_data delegate seems to be a possible solution...

Email :


2 . 2011-09-21 22:28:45

Larry wrote:

Hi,

Thank you for your reply. This is indeed what I'm looking for, but is there a way to set a value as a prefix then a word?.

So like:
A SameWord
B SameWord
C SameWord

The value I want it to be should be: prefix SameWord

Thank you so much for the help till now.

 

Email :


3 . 2011-09-14 13:17:23

Max wrote:

Hi Larry,
You could use the custom_slc_options property in order to customise the texts and values of your drop-down options as you can see in POP column of this demo: http://tablefilter.free.fr/datademo.htm

Email :


4 . 2011-09-13 15:18:11

Larry wrote:

Hey,

Thanks for getting back. I think I didn't ask my qeustion properly, wich I apologize for.

So here is it again:

So I have 1 colomn. To filter the content I use your dropdown menu. This dropdown menu will contain a list with the words from that column.

So if that column contains:
A
A
B
C
People can only choose from A, B, C.
But I want to type text after the A, B, C, wich should be hidden.
A (example1)
A (example2)
B
C

So is there a way to hide the words (example1) and (example2)? So People can still only choose from A, B, C in the dropdown menu. (AND NOT A (example1), A (example2), B, C))

 

Thank you very much!

 

Larry.

Email :


5 . 2011-09-13 13:46:00

Max wrote:

Hi Larry,
Well, you need to use the custom_cell_data callback function to do so. This callback is invoked just before the cell value is retrieved and consequently you'll be able by implementing your own logic to skip the words you don't want to filter. An exemple of this callback used to extract the checkbox and drop-down values can be found at: http://tablefilter.free.fr/custom-data.htm and the doc: http://tablefilter.free.fr/doc.php#grid_behave

Email :


Top of page

84 . 2011-09-09 15:23:58

Alan wrote:

Max -

First, thank you for creating and maintaining this excellent script - the filtering on its own is great, but its the option to include the different extensions as well that really sets this apart for me.

I have been able to implement tables with filtering, sorting, and column visibility and everything is working perfectly as long as I have only one table on a page.  If I try to display more than one table, the column visibility functionality is missing for every table other than the first one.  The first table is always the one to work, even when I change the order of the tables on the page, so it doesn't seem to be a syntax error on the later tables.  I'm using unique variables and identifiers for each table and TF instance so I don't see any obvious collision there.  Strangely, this error is only occuring for me on Firefox 6 and Chrome... IE9 (with compatibility mode enabled) renders multiple tables with all extensions. Using debugging tools to inspect my page, Firefox shows the error "o.SetColsVisibility is not a function" for every instance of the "initialize:[function(o){o.SetColsVisibility();}]" line after the first one on the page.  Chrome shows the error "Uncaught TypeError: Object #<Object> has no method 'SetColsVisibility'" for the same lines in that browser.

The demo page for Column Visibility extensions *does* display Column Visibility on both tables for me, regardless of browser, but I cannot seem to find what I'm missing in my implementation.  Can you (or anyone else here) make any recommendations on how to make Column Visibility work for multiple separate tables on a single page?

Example code follows.  Thanks in advance!

 

 

The script call after the first table (which has id="alertevents"):

<script language="javascript" type="text/javascript"> 
              var alerteventstable_Props =  {
                cols_visibility: true,
                rows_counter: true, 
                rows_counter_text: "Displayed rows: ", 
                rows_counter: true, 
                btn_reset: true,  
                col_4: "select",
                col_5: "select",
                col_6: "select",
                col_9: "select",
                display_all_text: " [ Show all ] ", 
                sort_select: true,
                alternate_rows: true,
                sort:true,
                sort_images_path: 'TableFilter_EN/TFExt_SortableTable/img/',
                sort_config: { 
                    sort_types:['Number','String','Number','Number','String','String','String','String','String','String'] 
                },
                extensions: {
                    name:['ColsVisibility'],
                    src:['TableFilter_EN/TFExt_ColsVisibility/TFExt_ColsVisibility.js'],
                    description:['Columns visibility manager'],
                    initialize:[function(o){o.SetColsVisibility();}]
                },
                showHide_enable_tick_all: true,
                showHide_cols_tick_to_hide: false,  
                showHide_cols_text: 'Displayed Columns: '}; 
                var alerteventtable = setFilterGrid( "alertevents",alerteventstable_Props );
            </script>

The script call after the second table (which has id="alerteventlisteners"):

<script language="javascript" type="text/javascript"> 
              var alerteventlistenerstable_Props =  {
                cols_visibility: true,
                rows_counter: true, 
                rows_counter_text: "Displayed rows: ", 
                rows_counter: true, 
                btn_reset: true,  
                display_all_text: " [ Show all ] ", 
                sort_select: true,
                alternate_rows: true,
                sort:true,
                sort_images_path: 'TableFilter_EN/TFExt_SortableTable/img/',
                sort_config: { 
                    sort_types:['Number','String'] 
                },
                extensions: {
                    name:['ColsVisibility'],
                    src:['TableFilter_EN/TFExt_ColsVisibility/TFExt_ColsVisibility.js'],
                    description:['Columns visibility manager'],
                    initialize:[function(o){o.SetColsVisibility();}]
                },
                showHide_enable_tick_all: true,
                showHide_cols_tick_to_hide: false,  
                showHide_cols_text: 'Displayed Columns: '}; 
                var alerteventlistenertable = setFilterGrid( "alerteventlisteners",alerteventlistenerstable_Props );
            </script>

Email : brkptr50 AT yahoo DOT com


4 Replies

1 . 2011-09-09 23:34:02

Max wrote:

May be importing sort and column visibility scripts and use the tablefilter.js or tablefilter_min.js could be enough... This need to be tested...

Email :


2 . 2011-09-09 17:47:34

Alan wrote:

Hi Max -

Thanks for the fast reply.  I was already importing the tablefilter_all.js file and the TFExt_SortableTable *.js files, but it didn't occur to me to also try explicitly importing the Cols Visibility file as well.  Now that I added that line per your suggestion, Column Visibility is working for all tables when there are multiple ones on the page in all browsers.

Thanks again for your help!

-Alan

Email :


3 . 2011-09-09 17:16:50

Max wrote:

... and if it is not enough also import the Column Visibility script:
<script src="TableFilter/TFExt_ColsVisibility/TFExt_ColsVisibility.js" language="javascript" type="text/javascript"></script>

Email :


4 . 2011-09-09 17:14:23

Max wrote:

Hi Alan,
I think you just need to import the all-in-one js document, that is, tablefilter_all.js or tablefilter_all_min.js this in your page. By doing so, you will avoid to rely on the automatic js modules loading mechanism, which seems to be unreliable on some browsers when there are many instances of the TF object.
Keep me posted

Email :


Top of page

85 . 2011-09-02 12:21:31

Tom wrote:

Hi Max (et all),

 

I seem to have a problem with my table (xml sheet with style sheet applied).

The first row is always visible. It does not react to any filter.

Config is as follows:

<script language="javascript" type="text/javascript">
//<![CDATA[   
    var props = {
        sort: true,
        sort_num_asc: [1,2,5,7,8],
        col_number_format: [null,'US','US',null,null,'US',null,null,'US',null],
        filters_row_index: 1,
        fixed_headers: true,
        remember_grid_values: false,
        alternate_rows: true,
        rows_counter: false,
        rows_counter_text: "Displayed rows: ",
        btn_reset: true,
        btn_reset_text: "Clear",
        status: true,
        status_bar: true,
        help_instructions: false,
        /*fill_slc_on_demand: true,*/
        col_0: "none",
        col_1: "select",
        col_2: "select",
            /*col_3: "none",*/
            col_4: "select",
            col_5: "select",
            col_6: "select",
            col_7: "select",
            col_8: "select",
            col_9: "select",
        custom_slc_options: {
            cols:[1,5],
            texts: [['< 30','31 - 100','> 100'],['< 60','>= 60']],
            values: [['<=30','>30 && <=100','>100'],['<60','>=60'] ],
            sorts: [false,false]
        },
        display_all_text: "[ Clear ]",
        /*enable_default_theme: true,*/
        input_watermark: 'Search...',
        public_methods: true,
        on_keyup: true,
        /*on_keyup_delay: 1000,*/
        themes: {  
                name:['Custom'],  
                src:['includes/Customcss/custom.css'],  
                description:['Custom stylesheet'],  
                initialize:[null] 
            }
    }
    var tf = setFilterGrid("demo",2,props);
//]]>

Any Help would be very appreciated.

Regards,

Tom

Email : t DOT leeters AT zonnet DOT nl


4 Replies

1 . 2011-09-06 10:52:59

Tom wrote:

Thanks for noticing that one... That paramter was completely overlooked as I did not use to have it...

It works now!

Thanks so much!

Email :


2 . 2011-09-05 18:12:07

Max wrote:

Ok I understand now,
Try to change the filtering start row, that is, the numeric argument passed to the TF object:
var tf = setFilterGrid('demo', 1, props);

Email :


3 . 2011-09-05 12:58:54

Tom wrote:

Thanks for the reply. With first row I mean the first data row is always visible. I do see the filters, they function, but not on the first data row. All other rows are effected and responding to the filter.

In the XML I changed some data around so that a different row was first, same thing happens with the first data row.

The config is at the bottom of my XSL sheet.

http://www.adimec.com/en/Service_Menu/Industrial_camera_products/Camera_selector is the link.

Any additional insight is very welcome..

 

Regards,

 

Tom

Email :


4 . 2011-09-03 11:33:14

Max wrote:

Hi Tom,
I don't understand excatly what you mean by 'The first row is always visible. It does not react to any filter.' Do you see the filters? In any case in asynchronous context always make sure you call the setFilterGrid method once the XML/XSL transformation is done, and the table DOM element exists before TF object is instanciated. 

Email :


Top of page

86 . 2011-09-01 21:13:00

Mich wrote:

Hey Max!

Your table script is really powerful and has a lot of great options for customization. Is it possible to set the single_search_filter to search the entire table while not eliminating other filters like select drop down boxes? I can't seem to find any of the examples that show this functionality. On a related note, is it possible to only make some columns sortable and not others? Thanks for the help!

Email : mdonovan AT executiveboard DOT com


2 Replies

1 . 2011-09-03 20:51:34

Max wrote:

Hi Mich,
You could instanciate 2 TF objects to achieve that, for exemple:

var tfSingle = setFilterGrid('demo', 2, { single_search_filter: true, external_flt_grid: true, external_flt_grid_ids:['singleFlt'], on_keyup: true });
    var tfMulti = setFilterGrid('demo', myConfig);

You need to specify a container element ('singleFlt') where the single text-box will be generated and also tell tfSingle object to start filtering from rowIndex 2, since tfMulti has generated its own filters row. 
I already had a comment similar to yours (Candy's comment #27).

To disable sort for a column :
...
sort: true,
sort_config: { sort_types: ['None', 'String'...] },
...

Please use demos page to check all demos using the sorting feature by filtering Properties column with 'sort' keyword.
I hope this will help you.

Email :


2 . 2011-09-02 09:02:00

Patrick wrote:

Hi,

I'm not Max but I can perhaps help you. Try to change the property refresh_filters. If you set refresh_filters: false, the others filters don't change.

Email :


Top of page

87 . 2011-09-01 16:12:23

Laura wrote:

I have been using your script for a few years now, and have found it very useful. I have a client that just upgraded to FF 6 (and so have I). In FF 5 and IE 7 and 8 I have a table with fixed_headers so that the table is scrollable, but in FF6, the table is not scrollable - it just shows the whole table.

In firebug, I see the tbody css is: style="height: 200px; overflow-x: hidden; overflow-y: auto;

The code is:

      <table   border="0" cellpadding="4" cellspacing='0' width="100%"  class='tablesorter'  id='selectList'>
                              <thead>
                                  <tr>
                                      <th>&nbsp;</th>
                                      <th>Search Name</th>
                                </tr>
                              </thead>
                            <tbody>

 <?php code here to populate the table ?>

                       </tbody>
                            </table>

 

and the script is just:

    var tConfig={   
            col_0: "none",
            col_1: "none",
            fixed_headers: true ,      
             alternate_rows:true
        }
                 
     var tf = setFilterGrid("selectList",tConfig); 

 

Is there a known bug in ff6?

 

Thanks


Email : lgrella AT acquiremedia DOT com


1 Reply

1 . 2011-09-01 20:40:29

Max wrote:

Hi Laura,
Thanks for your feedback. It is possible that FF6 does not support scrollable tbodies anymore.
I suggest to enable the grid_layout mode, however with no resizable columns (grid_enable_cols_resizer: false) as this exension needs to be uprgraded for latest browsers, it works fine with IE7, Safari, Chrome strangely enough but not anymore with IE8 & 9 and FF.

Email :


Top of page

88 . 2011-08-31 07:57:33

Patrick wrote:

Salut,

 

Je me demande si les lignes ci-dessous sont indispensables au fonctionnement de la grille filtrée?

 

    <!-- Syntax Highlighter - doesn't belong to table filter script - do not copy -->

    <link rel="stylesheet" type="text/css"
        href="includes/SyntaxHighlighter/Styles/SyntaxHighlighter.css" />
    <script src="includes/SyntaxHighlighter/Scripts/shCore.js"
        language="javascript" type="text/javascript"></script>
    <script src="includes/SyntaxHighlighter/Scripts/shBrushJScript.js"
        language="javascript" type="text/javascript"></script>
    <script src="includes/SyntaxHighlighter/Scripts/shBrushXml.js"
        language="javascript" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        //        
        tf_addEvent(window, 'load', initHighlighter);
        function initHighlighter() {
            dp.SyntaxHighlighter.ClipboardSwf = "includes/SyntaxHighlighter/Scripts/clipboard.swf";
            dp.SyntaxHighlighter.HighlightAll("code");
        }

        /*** IE only: show/hide selects during filtering operations ***/
        function hideIESelects(o) {
            if (tf_isIE) {
                var slc = o.tbl.getElementsByTagName('select');
                slc[0].style.visibility = 'hidden';
            }
        }

        function showIESelects(o) {
            if (tf_isIE) {
                var slc = o.tbl.getElementsByTagName('select');
                slc[0].style.visibility = 'visible';
            }
        }
        //
    </script>

 

 

Je pose la question, car je ne comprend pas où est-ce que le système va chercher les fichiers, par exemple "includes/SyntaxHighlighter/Scripts/shCore.js".

Si je supprime ces lignes chez moi cela ne fonctionne plus.

 

 

Merci

 

Email :


3 Replies

1 . 2011-09-03 11:23:09

Max wrote:

Pas de souci!

Email :


2 . 2011-09-02 09:07:36

Patrick wrote:

Salut,

 

Je ferai plus attention pour les prochains posts. Merci pour ton aide, en effet j'avais encore les 2 fonctions dans ma config.

Email :


3 . 2011-08-31 09:05:38

Max wrote:

Merci de poster dans la section francaise et de lire le 'Rules' de cette page.
Si non comme le commentaire l indique ces lignes n appartiennent pas au script....
Par contre verifie que les functions hideIESelects et showIESelects ne soient pas utilisés dans ton object de config.

Email :


Top of page

89 . 2011-08-29 10:51:13

Patrick wrote:

Hi,

 

I use the fonction SetFilterValue () to put a Date in a filter

<td><input type="radio" name="choixDate" onclick="tf_demo.SetFilterValue(1,'=' + Aujourdhui)">Ce jour</td>

The Date appear good in the textbox of the filter, but the filter don't run before I press Enter.

I have configure the parameter :        enter_key: false.

 

How to force to use a filter? Here is a function to call?

 

Thanks

 

Email :


2 Replies

1 . 2011-08-29 20:34:09

Patrick wrote:

It works fine.

 

Thank you Smile

Email :


2 . 2011-08-29 13:34:44

Max wrote:

Hi Patrick,
To filter you have the Filter() function: tf_demo.Filter();

Email :


Top of page

90 . 2011-08-23 10:32:47

W. wrote:

Hi,

First of all, awesome job on the code!

My Question:
Is there a way to get the dropdown box/search box on the left side of the table, and not inside the table? So like this: http://i.imgur.com/Q5RhX.png

Thanks in advance!

(Will of course donate if I get it working!)

Email :


2 Replies

1 . 2011-08-24 09:07:01

Max wrote:

Or this one: http://tablefilter.free.fr/external-grid.htm

Email :


2 . 2011-08-23 18:03:47

Patrick wrote:

Perhaps this example ? : http://tablefilter.free.fr/ajaxdemo2.htm

 

 

Email :


Top of page

91 . 2011-08-12 14:02:05

Joe wrote:

Max,

 

Thanks for your timely response.  Sorry for the delay in getting back here...but I wanted too say thank you for the point in the right direction.  The "refresh_filters: true" works just as it should.  I did have another question I was wondering if you could help me with.  I don't want to take up too much of your time here, but I was wondering if it was possible to run the Autosuggest code on a individual columns like a combobox effect...?  The autosuggest works when I try it, but the whole table is in the drop down and it only gives the row info when you select one.  Is it possibly to have it work where you click on the header of a column and have it just filter that column?

 

I have a plugin that does this very thing on any select boxes on a table that is very easily implemented and I don't really have to do anything.  The problem with that one is that every time I search another box on the table the original select dropdown it's hiding becomes unhidden and the autosuggest goes behind it.  I'm thinking after every search there might be a way to refresh the plugins or something but this is beyond me I'm afraid.  Very frustrating because your Table Filter has given me 99.9% of everything I want!  If you have the time to assist I would really appreciate it!

Thanks again,

Joe

Email :


1 Reply

1 . 2011-08-13 19:01:21

Max wrote:

Hi Joe,
I am not sure I understood your problem, is it just a display issue of the autosuggest component you are using?
If your issue concerns more the plugin you are using along with the TF script, in that case I suggest to place a request in Premium Support form, if you wish. In fact, I provide "free" support only for issues concerning this script.
If you are not sure if it is a TF issue or not, then send me a working example in an html page (no server-side pages please) and I will have a look, my email is just below.

Email : tablefilter AT free DOT fr


Top of page

92 . 2011-08-04 17:58:28

Barbara wrote:

Hi Max,

Me again. I have a question about sorting. I have been using Stuart Langridge's sorttable script which I can customize each cell by putting his sorttable_customkey="whatever I put here" in each td tag. Is there something similar in the sortabletable script that you use?

For example, I have products titled: QT1, QT1T, QT2, QT3, QT10, QT28, QT122, etc.

In the sort that you provide it sorts:

QTi

QT10

QT122

QT1T

QT2

QT28

QT3

In Stuart Langridge's script I can customise each cell with sorttable_customkey=" my num combination " and it sorts in the exact order: QT1, QT1T, QT2, QT3, QT10, QT28, QT122, etc.

Is this possible in your sort script to do this as well?

Thanks so much again. (I am still working on this table with you filter so I will probably have more questions)

 

Barbara

Email :


8 Replies

1 . 2011-08-16 16:41:30

Barbara wrote:

I removed the custom sorter and modified the on_sort_loaded but the sort is not working the same as sort that I have been using. The template that I use for all the pages have a link to Stuart Langridge's sorttable script so I'm thinking that maybe that is causing it not to work. I have been busy with other projects so when I get a chance, I will modify my html template and see if that is the problem. I will post back and let you know.

Thank you so much again,

Barbara

Email :


2 . 2011-08-13 18:28:27

Max wrote:

Ok I see, now. The sort value is stored in a custom attribute of the cell element.
In that case, you don't even need to implement custom sorters, you just need to override the way the sort value is retrieved by the sorting script, in short, remove your custom sorter and modify the on_sort_loaded callback as follows:

var tfConfig{
...
        on_sort_loaded: function(o, sortObj){
            //Overrides getInnerText method in order to retrieve sort value from sorttable_customkey attribute
            SortableTable.getInnerText = function (oNode) {   
                if (oNode.getAttribute('sorttable_customkey') != null) {
                    return oNode.getAttribute('sorttable_customkey');
                } else {
                    return tf_GetNodeText(oNode);
                }
            };
        },
...
}

In this way, this sorting facility will behave as the one you currently use on your website.

Email :


3 . 2011-08-12 17:03:04

Barbara wrote:

Hi Max,

Here is a link to the website that has tables with columns that sort. if you would like a sample of the code, let me know what portion of the code would be useful for you to look at.

 

http://www.q-tech.com/hirel.html

 

Thanks,

Barbara

 

 

Email :


4 . 2011-08-12 09:14:14

Max wrote:

Hi Barbara,
No, the sort script (WebFx Sortable Table 1.12 (Erik Arvidsson)) I use for this script, has no class attribute to customise column sorting, by the way I am curious to see how your sort script works...
In any case, the demo http://tablefilter.free.fr/custom-sort.htm I posted recently shows how to implement 'programmatically' your own column sorters (images or HZ and MHZ units etc...)...

Email :


5 . 2011-08-09 16:33:19

Barbara wrote:

Hi Max,

Thank you so much for taking the time to show me this script. I see that in your demo the sorting works but in my table it is not. I have images in the same cell as the product number and was wondering if that was affecting this script from working for me.

Also, I have other cells that have data that are a bit more complicated that needs to be customize further because it has to do frequency and voltages so the script that Stuart Langride's sorttable created has been really effective as I am able to customize each cell to sort accordingly. For example, if I have a frequency that is 100Hz and another that is 1MHz, the 100Hz comes before 1MHz because Hz is a lower than MHz.

Does your script have a way to sort by a class attribute or something? If I am being too difficult, please forgive me. I can do without the sorting for now.

Again, thank you for your hard work on your filter table. It's great.

Email :


6 . 2011-08-06 19:16:04

Max wrote:

Hi again,
I have just added a demo page showing how to implement a custom column sorter: http://tablefilter.free.fr/custom-sort.htm
Please note I have updated Sortable Table extension (v1.6).

Email :


7 . 2011-08-06 11:51:22

Max wrote:

Hi Barbara,
I understand what you mean. Yes, it is possible to implement custom sorter functions in order to sort columns with specific criterias. You can define all this in the config object as usual:
var myConfig = {
   ...
   sort: true,
   sort_config: {
      sort_types:['enforceinteger','String','Number',...] //new sort type: 'EnforceInteger'
   },
   on_filters_loaded: function(o){
      //Add custom sort type function according to WebFx Sortable Table 1.12 script (Erik Arvidsson) API
      SortableTable.prototype.addSortType( 'enforceinteger', o.fObj.enforceIntegerSorter );
      //Note o.fObj is the TF property referencing this configuration object
   },
   //Custom sorter function placed in the config obj itself
   enforceIntegerSorter: function(val){
      var m = val.match(/\d+/);     
      return parseInt(m[0], 10);
   }
   ...
};

This example assumes that your column (QT1, QT1T,... QT122) is the first one. I called the sort type 'enforceinteger' as I understand you want to sort according to the number contained in the string.

Email :


8 . 2011-08-04 18:11:51

Barbara wrote:

Oops, QTi is suppose to be QT1 in sorted example. I have other cells that require custom sorting so if it is possible it would be great other wise I will do without sorting for the time being.

Email : bmaryziering AT sbcglobal DOT net


Top of page

93 . 2011-07-28 18:31:44

Joe wrote:

Max,

As many others have already said, this is a great easy to use script.  I'm not any kind of programmer but I've been able to get your script working without much trouble and I've hit a point where I could use a hand.  I have a large table (about 2,000 rows) and 3 columns.  I have a select filter on the first column and text input filters on the second columns.  My ideal solution is to have the second column also be a select filter that is only populated with info based on the selection from the first filter and just get rid of the third altogether.  Is this possible? 

Thanks!

 

 - Joe

Email : jfrancis2 AT rochester DOT rr DOT com


2 Replies

1 . 2011-08-10 00:36:03

Joe wrote:

Max,

 

Thanks for your timely response.  Sorry for the delay in getting back here...but I wanted too say thank you for the point in the right direction.  The "refresh_filters: true" works just as it should.  I did have another question I was wondering if you could help me with.  I don't want to take up too much of your time here, but I was wondering if it was possible to run the Autosuggest code on a individual columns like a combobox effect...?  The autosuggest works when I try it, but the whole table is in the drop down and it only gives the row info when you select one.  Is it possibly to have it work where you click on the header of a column and have it just filter that column? 

 

I have a plugin that does this very thing on any select boxes on a table that is very easily implemented and I don't really have to do anything.  The problem with that one is that every time I search another box on the table the original select dropdown it's hiding becomes unhidden and the autosuggest goes behind it.  I'm thinking after every search there might be a way to refresh the plugins or something but this is beyond me I'm afraid.  Very frustrating because your Table Filter has given me 99.9% of everything I want!  If you have the time to assist I would really appreciate it!

Thanks again,

Joe

Email :


2 . 2011-07-29 13:40:39

Max wrote:

Hi Joe,
Yes, you just need to enble the refresh_filters property in your configuration object. Refer to this sample: http://tablefilter.free.fr/ex.php#tbl10 and to doc page: http://tablefilter.free.fr/doc.php#grid_behave ...
I think the description of this property needs to be improved, I must admit this needs to be made more clear I don't understand myself what does it mean exactly ... Surprised

Email :


Top of page

94 . 2011-07-28 16:26:20

Barbara wrote:

Hi Max,

The script to have rows hidden by default works great. I have another question. When the reset button is clicked it shows all rows. Is it possible to have it revert back to hide all rows? When I refresh the browser it goes back to the hidden rows but it would be nice if it refreshed when I click the reset button.

Thanks so much for you work.

Barbara

Email :


6 Replies

1 . 2011-07-29 19:08:34

Barbara wrote:

Sorry for not being specific. In i.e. 6 the filter grid is not there anymore with this script. But works great in i.e. 8, Safari, Firefox.

Thanks again

Barbara

Email :


2 . 2011-07-29 18:59:23

Barbara wrote:

It doesn't work on i.e. 6  Frown Works on i.e 8, Safari, Firefox.

does it work for you on i.e.6?  Maybe it's me.

 

Barbara

Email :


3 . 2011-07-29 18:52:01

Barbara wrote:

Works beautifully !! Laughing You are amazing!! I love this script!!

Thank you soooo much!

 

Barbara

Email :


4 . 2011-07-29 18:03:26

Max wrote:

Ok, I see. I have slightly changed the 2 callbacks of the config object in order to make the difference between the clear button and the <Show all> option of the filters:
...
        on_filters_loaded: function(o){
            o.Evt._Clear = function(){ o.ClearFilters(); o.activeFilterId = ''; }; //clear event is overridden
            o.btnResetEl.onclick = o.Evt._Clear; //clear event is re-assigned to clear button
            for(var i=o.GetStartRowIndex(); i<o.tbl.rows.length; i++){
                var row = o.tbl.rows[i];
                if(row) row.style.display = 'none';
            }
        },
       
        on_after_filter: function(o){           
            var isClear = (o.GetFiltersValue().join('') == '' && o.activeFilterId=='');
            if(isClear){
                for(var i=o.GetStartRowIndex(); i<o.tbl.rows.length; i++){
                    var row = o.tbl.rows[i];
                    if(row) row.style.display = 'none';
                }
            }
        },
...

Email :


5 . 2011-07-29 16:57:49

Barbara wrote:

Hi Max,

Thanks again. This script works however if a user only filters one column then decides to select "All" to see all available products, the table hides all rows instead of showing all products because all of the filters becomes empty. Is it possible to use a refresh script like javascript:history.go(0)" when use clicks the "reset" button to refresh the page?

Thanks,

Barbara

Email :


6 . 2011-07-29 13:58:07

Max wrote:

Barbara,
Ok, by using the on_after_filter callback event, raised just after the filtering process is completed, you can hide the table rows only if all the filters are empty. You just need to add this piece of code to your configuration object that should already contain a on_filters_loaded callback event:
...
on_after_filter: function(o){
            var isClear = (o.GetFiltersValue().join('') == '');
            if(isClear){
                for(var i=o.GetStartRowIndex(); i<o.tbl.rows.length; i++){
                    var row = o.tbl.rows[i];
                    if(row) row.style.display = 'none';
                }
            }
        },
...

Email :


Top of page

95 . 2011-07-27 11:42:25

forestgreen wrote:

Hello and thanks for this wonderful script.

The only problem I have currently is that the HELP popup window will not properly display in IE 8 (8.0.6), actually it pops up but you can only see the upper edge and the rest is hidden under the header bar of the following table. It displays fine in Firefox.

Is there any IE specific setting necessary which I have overlooked?

Your examples work fine in my IE browser, but I cannot find the reason why this happens.

Email : c_d_g at web dot de


1 Reply

1 . 2011-07-27 14:14:17

Max wrote:

No, there is no specific setting for IE. You can either edit the filtergrid.css stylesheet, more specifically the .helpCont class or define your own css class by using the help_instructions_container_css_class property in your configuration object:
var myConfig = { ... help_instructions_container_css_class: 'myCssClass', ... }
You may have a z-index problem with IE from what I understand...

Email :


Top of page

96 . 2011-07-22 21:00:20

MILESSMILES wrote:

For some reason I receive this javascript error "this.tbl is null"

at this line:

{var s=this.refRow==undefined?0:this.refRow;var ntrs=this.tbl.rows.length;return parseInt(ntrs-s);},GetCellData:function(i,cell)

 

For the life of me, I can't understand why this error occurs.  In IE it prevents the page from loading in a timely manner along with the nasty error that it gives.  Has anyone else had this issue?

Email : bodymoves AT gmail DOT com


1 Reply

1 . 2011-07-22 21:56:45

me wrote:

Nevermind, got it.  linked the tablefilter_min.js file twice, had to remove one.

Email :


Top of page

97 . 2011-07-21 22:32:43

Vasan wrote:

Hi Max,

I have just implemented the filter for one of my projects using your script. It is absolutely wonderful and very simple looking, but works great!

Thanks for the work and allowing us to use your work.

Keep it going! Good Luck.

Email :


1 Reply

1 . 2011-07-22 13:02:28

Max wrote:

Thanks Vasan I appreciate Smile!
If your project is public please do not forget to send me the URL, for my references page.

Email :


Top of page

98 . 2011-07-21 15:15:46

Patrick wrote:

Tout d'abord un grand bravo pour tout le travail, c'est magnifiqueSmile!

J'aimerais savoir si quelqu'un a des exemples avec des enchainements de page? Par exemple la grille sur une page et les valeurs des filtres récupérées sur la page suivante?

Merci beaucoup.

Email : patrick DOT panchaud AT gmail DOT com


6 Replies

1 . 2011-08-17 16:59:15

Patrick wrote:

Salut,

Ta solution fonctionne bien, merci.


Je ne sais pas si c'est un problème d'implémentation dans mon projet, mais je viens de rencontrer un problème.

J'utilise les filtres de grilles avec les cases à cocher. J'ai notamment le paramètre

        display_all_text: "[ TOUT ]"

Je viens d'ajouter le paramètre :

        refresh_filters: true,

 

Avec l'ajout de ce paramètre, l'appuie sur le texte [TOUT] ne fonctionne plus.

Ces 2 paramètres sont-ils incompatibles?

 

Si t'as besoin de plus d'informations, je te donne volontiers tout le code source.

 

Merci d'avance

 

Email : patrick DOT panchaud AT gmail DOT com


2 . 2011-07-27 20:50:30

Max wrote:

En fait, tu n'as pas besoin d'utiliser l'événément onclick de la case à cocher, tu aurais juste à utiliser la callback on_after_filter, declenché une fois que l action de filtrer est terminée, ce serait qqchose comme ça:
var monConfig = {
...
   on_after_filter: function(o){
      document.getElementById('form1').idAnnee.value = o.GetFilterValue(2);
   },
...
};

Email :


3 . 2011-07-27 15:12:25

Patrick wrote:

Merci pour ton aide, je viens de réussir à réaliser une partie de ce que je souhaitais réaliser.

J'ai réussi à insérer dans un champ la valeur du filtre d'une colonne lors d'un clic sur un bouton.

Je souhaite que cette valeur soit insérée lorsque je clique sur une case à cocher d'un filtre de type "checklist". Comment peut-on faire pour gérer un événement lors du clic sur une case à cocher du filtre?

 

Je mets ici le code que j'ai déjà, ainsi ça pourra peut-être aider d'autres personnes :

 

Créer un formulaire avec 2 champs:

<form name="form11" onSubmit="listContacts" id="form1" method="post">

Country : <input type="text" name="country" id="idCountry"><br>
Year : <input type="text" name="annee" id="idAnnee"><br>

</form>

Créer un bouton et ajouter un événement à celui-ci. Au clic cela modifie la valeur d'un champ par la valeur du filtre d'une colonne.

<input type="button" value="Country" onclick="document.getElementById('form1').idCountry.value=tf_demo.GetFilterValue(0)" />
<input type="button" value="Year" onclick="document.getElementById('form1').idAnnee.value=tf_demo.GetFilterValue(2)" />

Email :


4 . 2011-07-26 21:46:12

Max wrote:

Je n'ai pas ce type d'exemple, mais pour passer les valeurs coté serveur tu pourrais utiliser des champs cachés par exemple. Avec l'API du script tu peux facilement copier les valeurs dans des inputs cachés à toi, pour qu ils soient récupérés coté serveur...

Email :


5 . 2011-07-26 09:33:58

Patrick wrote:

Merci pour ta réponse.

En fait je vais essayer d'intégrer une grille à une application complète en JSP. Ce que je cherche à réaliser est de pouvoir envoyer vers une servlet la valeur des filtres de la grille.

 

As-tu des exemples d'intégration de grille avec le framwork JSP?

Merci beaucoup Wink

Email :


6 . 2011-07-22 12:55:09

Max wrote:

Salut Patrick, d abord merci!
Je ne suis pas sur d avoir compris ta question? Est-ce que tu voudrais une persistence des valeurs des filtres d' une page a l autre, au rechargement d une autre page?
Si tel est le cas il y a un mecanisme de persistence par cookie, et la propriete a activer est remember_grid_values, voici qques exemples d utilisation:
http://tablefilter.free.fr/load-filters-on-demand.htm
http://tablefilter.free.fr/datademo2.htm
http://tablefilter.free.fr/filter-sort.htm
http://tablefilter.free.fr/theme.htm

Je te coseille d aller dans la section demos est filtrer la colonne properties avec la propriete en question.
Tu peux aussi consulter la doc: http://tablefilter.free.fr/doc.php#grid_behave

Email :


Top of page

99 . 2011-07-20 20:26:03

mrniemand wrote:

First I need to say thank you very much for your great work.

I have one question(I didn't find an answer in the demos, docs and so on):

I want to extend the help information with some information to the filters, which the user can work with (in german) language.

If I understand the system correctly, I can use help_instructions_container_target_id for this, in which i can for example add an little table, or stuff like this). Can you give me a little help, who to implement this? Or am I on the wrong ship whis ..._target_id?

Thanks.

 

Email : leader AT simplesign DOT de


1 Reply

1 . 2011-07-22 12:41:33

Max wrote:

Hi mrniemand,
the help_instructions_container_target_id is actually the id of the element that contains the help text. You can use the help_instructions_html property in order to define your own html code for the help content, as described at following doc page: http://tablefilter.free.fr/doc.php#grid_help
Give me a sign if any issue concerning this feature.

Email :


Top of page

100 . 2011-07-15 10:42:51

Alan wrote:

Hi,

Thank you for sharing this great script.

I am looking to have the table load without any rows showing under the table headers until someone selects an option from the dropdown list, then you get your filtered results, and other options in cols 2 and 3.

I tried to use the paging_length but this didn't work, could you help?

 

Kind regards

Alan  

Email : bagley DOT woody AT gmail DOT com


7 Replies

1 . 2011-07-26 16:45:33

Barbara wrote:

Never mind my last comment about altering your script keeping the setFilterGrid. I see that you were just posting the script that goes with the configuration object.

Email :


2 . 2011-07-26 16:30:15

Barbara wrote:

Max,

You are a genius. Wish I had your brain. It worked. Thank you so much. I did alter you script a teensy bit though. I kept the script: var tf = setFilterGrid( "table1",table1_Props ); at the end in order for the filter grid to show.

I do have a question though. Is there a way to have it revert back to collapse (hide rows) when I hit the reset button?

<script language="javascript" type="text/javascript">

var table1_Props = 

{  

filters_row_index: 1,

alternate_rows: true ,

display_all_text: "(All)",

help_instructions: false,

btn_reset: true,

btn_reset_html: '<input type="button" value="reset" class="pgInp" />',

slc_filling_method: 'innerHTML',

refresh_filters: true,

col_0: "select",

col_2: "select",

col_3: "select", 

col_5: "select",

col_6: "select",

col_7: "select",

highlight_keywords: true,

   on_filters_loaded: function(o){

        for(var i=o.GetStartRowIndex(); i<o.tbl.rows.length; i++){

                var row = o.tbl.rows[i];

                   if(row) row.style.display = 'none';

              }

    }

};

var tf = setFilterGrid( "table1",table1_Props );

</script>

Email :


3 . 2011-07-26 12:32:51

Max wrote:

You don't need 2 configuration objects, one is enough:

var table1_Props = { 
    filters_row_index: 1,
    alternate_rows: true ,
    display_all_text: "(All)",
    help_instructions: false,
    btn_reset: true,
    btn_reset_html: '<input type="button" value="reset" class="pgInp" />',
    slc_filling_method: 'innerHTML',
    refresh_filters: true,
    col_0: "select",
    col_2: "select",
    col_3: "select",
    col_5: "select",
    col_6: "select",
    col_7: "select",
    highlight_keywords: true,
    on_filters_loaded: function(o){
        for(var i=o.GetStartRowIndex(); i<o.tbl.rows.length; i++){
                var row = o.tbl.rows[i];
                   if(row) row.style.display = 'none';
              }
    }
};

Email :


4 . 2011-07-26 00:29:03

Barbara wrote:

Thanks Max,

I tried that code but still doesn't work. I'm sure I'm doing something wrong somewhere as I am really new at this stuff. I have this code below my table including the code you just posted. If this looks ok to you then I will go back to the drawing board and see if I can figure where I messed up. Thank you for responding.

 

 

<script language="javascript" type="text/javascript">

var table1_Props = 

{  

filters_row_index: 1,

alternate_rows: true ,

display_all_text: "(All)",

help_instructions: false,

btn_reset: true,

btn_reset_html: '<input type="button" value="reset" class="pgInp" />',

slc_filling_method: 'innerHTML',

refresh_filters: true,

col_0: "select",

col_2: "select",

col_3: "select", 

col_5: "select",

col_6: "select",

col_7: "select",

highlight_keywords: true,

};

var tf = setFilterGrid( "table1",table1_Props );

var myConfig = {

    on_filters_loaded: function(o){

      for(var i=o.GetStartRowIndex(); i<o.tbl.rows.length; i++){

        var row = o.tbl.rows[i];

        if(row) row.style.display = 'none';

      }

    },

 

};

</script>

 

Email : bmaryziering AT sbcglobal DOT net


5 . 2011-07-25 19:35:30

Max wrote:

Thanks Barbara, I appreciate Smile!
If you dont use the remember_grid_values, remember_page_number, grid_layout properties this is the code I just successfully tested:
...
on_filters_loaded: function(o){
      for(var i=o.GetStartRowIndex(); i<o.tbl.rows.length; i++){
        var row = o.tbl.rows[i];
        if(row) row.style.display = 'none';
      }
    },
...
Let me know.

Email :


6 . 2011-07-25 16:27:13

Barbara wrote:

Hi,

This is the best table filter script that I have found.

I tried this script for hiding table rows by default but did not work for me. I was wondering if it worked for Alan. If it did, then I probably have to see where my problem is in other parts of the script.

Thank you for this wonderful script.

Barbara

Email : bmaryziering AT sbcglobal DOT net


7 . 2011-07-17 11:16:29

Max wrote:

Hi Alan,

The paging_length property defines the length of a page when paging is on. So this is not the right way to do it. You'd better use the on_filters_loaded callback event function (fired when filters are generated) in order to hide the rows of your table programmatically at start, the code could be something like:

var myConfig = {
    ...
    on_filters_loaded: function(o){
             for(var i=0; i<o.tbl.rows.length; i++){
            var row = o.tbl.rows[i];
            if(row){
                row.style.display = 'none';
            }
        }
    },
      ...
};

Please note that as I am on vacation I haven't tested the code above.
Give me a sign if any problem with it

Email :


Top of page

101 . 2011-07-12 13:16:41

Navneet Singhal wrote:

Is it possible to create a table filter on the table containing nested elements within cells. for eg:

<table cellspacing="0" id="table1">
  <tbody>
  <tr>
   <th>1st Col</th>
   <th>2nd Col</th>
  </tr>
  <tr>
   <td>navneet</td>
   <td>
    <table><tr><td><input type="text" value="100"/></td></tr></table>
   </td>
  </tr>
  <tr>
     <td>amit</td>
     <td><table><tr><td><input type="text" value="200"/></td></tr></table></td>
  </tr>
  <tr>
     <td>sumit</td>
     <td><table><tr><td><input type="text" value="300"/></td></tr></table></td>
  </tr>
</tbody>
 </table>

*** Filter on the above table structure is not working for me.

Email : navneetsinghal AT gmail DOT com


1 Reply

1 . 2011-07-12 21:20:52

Max wrote:

Since the text you want to filter is inside the value attribute of the input element, you need to use the custom_cell_data callback event in order to extract the value. Check out this demo http://tablefilter.free.fr/custom-data.htm in order to see how to use implement it.

Email :


Top of page

102 . 2011-07-10 23:42:55

Rob wrote:

Hi

Great job!
Only sorting is giving me a headache, I can only get it to work with GChrome and FFox using it in IExplorer and clicking on a header will sort a wrong column; eg. selecting header for col 1 will sort col 2 - selecting 2 will sort 4 etc. Seen in IE7-8 and 9

I tried to download your demos, using these gace the same results - any ideas?

Rob

Email : robin AT robsoft DOT dk


5 Replies

1 . 2011-07-21 11:11:11

mrniemand wrote:

I tried the script on IE9 @ win7 64bit and I didn't have any problems with the sorting.

Email :


2 . 2011-07-18 07:49:55

Nancy wrote:

Sorting errors and incorrect column sort indicators show up for me on Win 7 using IE9.

Problem shows on both your online demos and on tables on my local machine.

Setting IE9 to “compatibility view” (replicating IE8) solves the problem.

Also - trying to reply to this post using IE9 did not work, the reply text box did not function.

Setting IE9 to “compatibility mode” for tablefilter.free.fr solved that as well.

 

Thanks for your work - this is a great tool.

Nancy

Email :


3 . 2011-07-11 08:56:50

Max wrote:

Rob,
I just tested Win7 64bit IE8 and it is fine, must be then a new surprise from IE9...
For the moment I can't test IE9 at home and office, but I will have a look whenever possible.
Thanks for pointing out this IE9 issue

Email :


4 . 2011-07-11 00:54:18

Rob wrote:

Downgraded to IE8 and everything is working, so IE9 is probably the culprit regarding sorting or it's the combination of Win7 64 and IE9

 

 

Email : robin AT robsoft DOT dk


5 . 2011-07-11 00:14:07

ROP wrote:

update:

WIN7 64bit IE9 : sorting does not work
WIN XP 32bit IE8 : sorting works

/ROP

Email : robin AT robsoft DOT dk


Top of page

103 . 2011-07-08 17:10:35

Cristopher Dreckmann wrote:

i have problems with utf8 code, specially with letter ñ.

anybody know how can i resolve this problem??

Email : cristopher AT dreckmann-ltda DOT cl


1 Reply

1 . 2011-07-09 20:32:44

Max wrote:

What is your problem?

Email :


Top of page

104 . 2011-07-08 10:00:14

Steve wrote:

Hello,

First, thank you for the script, I must say that it is very impressive and elaborate.

I am beginning to understand the basics of it, but what i don't get is how to get the div that contains the paging, rows counter, etc to be the same width as the table as it does not have a fixed width.

The easiest would be to just generate that div inside my table as an additional th, but I can't figure out how to do that... That would also mean that it would emulate my table style and there would be no need for me to style the individual object anymore.

I would appreciate any input on this.
Thanks in advance,

Steve

Email : steve AT stevek DOT be


1 Reply

1 . 2011-07-08 10:49:33

Steve wrote:

it would seem that I have answered my own question ...

rows_counter_target_id

Email :


Top of page

105 . 2011-06-30 11:10:06

Isabel wrote:

Hello Max,

Really nice job :)

One short question related with paging? In my table have 2 rows as a header and when I set paging true, the 2cnd row of the header is taked as a mormal row of the table, and when I change the page I can't see it (I only see the first row of my header). I have tried with rows_always_visible, but it doesn't work. Can you help me?

Thanks

Isabel

Email : isabel DOT fd AT gmail DOT com


2 Replies

1 . 2011-07-01 16:54:09

Max wrote:

Hi Isabel,
I am sorry I don't understand... Have you tried this, var tf = setFilterGrid('tableId', 2, myConfig);
The numeric parameter 2, tells the script from which row to start the filtering process.
Please refer to the home page, How to implement the filter grid bar section and the documentation pages too, in particular, the Constructor table.

Email :


2 . 2011-07-01 15:41:42

Isabel wrote:

Hi Max,

I have found the solution :)

Forcing to filter, the headers are always in all the pages. 

 

function(o){o.Filter();}

But... when I change the value of "results_per_pages" I only can see my header in the first page... until I do a filter... and then everything is OK.

So my question is: there is a propiety on_change_results_per_page, or something similar to force a filter when the user change the results per page?

Merci a l'avance!

on_filters_loaded:

Email : isabel DOT fd AT gmail DOT com


Top of page

106 . 2011-06-27 23:51:25

Ryan wrote:

Hello,

A couple of years ago I asked after some sort of column visibility memory so that if you refresh a page you don't lose column visibility preferences.  Is this a hard change to make?

I'd like something like these options for the column visibility:

remember_grid_values, remember_page_number, remember_page_length

Out of all the memory, this is the one I would find most useful on refresh.

Thanks!

 

Email : ryan DOT friedman AT ni DOT com


1 Reply

1 . 2011-06-29 09:04:52

Max wrote:

Ryan,
It is not a hard change to make, actually the script's API is quite extensive and it could be done without touching the script code, just by using the many callback events available for the columns visibility extensions.
I remind this is a free and open source project and I do all this on my spare time and cant satisfy all demands, but anyone is free to improve the code and share the improvements.
If this is a feature you need in your project you can place a Premium support feature request.

Email :


Top of page

107 . 2011-06-22 21:31:05

Frank wrote:

Sorry to bother you again, but I have a question about url params. Im all set up, but cant figure out if i can get "beetween" values? Lets say I want values beetween 100 and 199 from column 2 ---> " url-params.php?2=>99&2<200" this doesnt work. Any other ways to do it?

 

 

Email :


5 Replies

1 . 2011-07-02 11:25:32

Max wrote:

You use it in the same way...

Email :


2 . 2011-06-29 16:53:04

Frank wrote:

Nice, thank you!

My only problem is now that if I have dropdown menu (col_X:'select') and custom_slc_options , how do I use URL params then?

Email :


3 . 2011-06-25 11:53:10

Max wrote:

Hi again Frank,
I just re-posted the url-params demo (http://tablefilter.free.fr/url-params.htm) showing how to implement a multi-operator (&&) search (solution 1 in my previous reply). However, to do so you need to perform a very easy quickfix on tablefilter_all.js and/or tablefilter.js document(s), just a line to replace as follows:

  • locate this line (ln 3914 [tablefilter_all.js] or ln 1611 [tablefilter.js] on my editor):
    var sAAndSplit = sA.split('&&');//multiple search parameter operator &&
  • replace it by:
    var sAAndSplit = sA.split(this.anOperator);//multiple search parameter operator &&

Indeed I was too much confident in my previous reply Embarassed, there was something wrong...
Please note that this quickfix will be included in the next release.

Email :


4 . 2011-06-23 14:05:51

Max wrote:

Hi Frank,
I guess you can achieve that in 2 ways, the problem for url parameters is the operator itself (&&) which is also the url parameters separator :

  • either, you change the AND (&&) operator by adding a property in your config object
    var config = {
       ...
       and_operator: '~~', // '&&' by default
       ...
    }
    and then test your url by replacing the && characters by your AND chars, ~~ in this case (url-params.php?2=>99~~<200)
  • or you modify the on_filters_loaded callback event function logic to let the && operator work (this seems to me a little bit more complicated... Undecided)

Please note, I haven't tested the first solution but I am confident...Laughing

Email :


5 . 2011-06-22 21:43:58

Frank wrote:

Also, what to do if I have " col_2: "select", " and then I have custom_slc_options: for col_2 ? Can I use url params then?

Email :


Top of page

108 . 2011-06-20 03:40:03

Frank wrote:

Also noticed that you cant use custom_slc_options when using either "checklist" or "multiple" methods. If you have:

 custom_slc_options: {
            cols:[2],
            texts: [['0-99','100-199','200-']],
            values: [
                        ['>=0 && <=99','>99 && <200','>199']
                    ],
            sorts: [false]
       
       
        }, ....

And then you select 2 it doesnt work, it shows only first selection. If you select bottom 2, it doesnt show anything, even if table have right values. When selecting only 1 at time, it works like a charm.

Email :


1 Reply

1 . 2011-06-20 13:28:44

Max wrote:

Hi again Frank,
I will have a look, this bug sounds familiar to me and I tought it was solved...
Thanks for pointing this out

Email :


Top of page

109 . 2011-06-17 00:19:02

Frank wrote:

Huge thanks for this script! Really great work, and clear instructions for a total newbie like me.

So, I got it working with checkbox filter. But, now Im trying to get it look better when using checkboxes. As I said, Im total beginner and Im struggling to solve how I use these checkboxes correctly. If you could point me into right direction, how to list checkboxes vertically/horizontally - how to locate them side of the table - and how to modify their looks/colors, I would appriciate it a lot!

Email :


1 Reply

1 . 2011-06-20 13:24:54

Max wrote:

Hi Franck,
I you want to customise the look of the checklist filters you can either use the configuration properties listed in the doc:
http://tablefilter.free.fr/doc.php#grid_checklist
or edit the script's main stylesheet: filtergrid.css (class names containing checklist word)

Email :


Top of page

110 . 2011-06-10 08:00:10

Dragonlord wrote:

Post your comment here...

Can I sort checkbox? disable/enable

<td><input type="checkbox"></td>
<td><input type="checkbox" disabled></td>
Thanks

Email : dragonlord888 AT hotmail DOT com


1 Reply

1 . 2011-06-11 10:57:29

Max wrote:

Hi Dragonlord,
I never tried to do so, I am not sure it works...

Email :


Top of page

111 . 2011-06-09 04:36:26

Candy wrote:

Table Filter is such a great stuff!

Both Filter for all Columns & single search filter works great, but is there anyway I can use both of them on a single table?

I have tried setFilterGrid twice with different props on the same table, but the filters seem not quite compatible with each other. Any example for that?

Thanks!!

Email : hkcandysweet AT yahoo DOT com DOT hk


3 Replies

1 . 2011-06-14 22:42:32

Max wrote:

I just sent an example to you, on the email you provided above...

Email :


2 . 2011-06-14 04:06:00

Candy wrote:

Thanks Max! Would love to know the result. If it is not feasible now, you may consider adding this in the later version :)

Email :


3 . 2011-06-11 10:48:39

Max wrote:

Hi Candy,
No I don't have exemples for that, I will make some tests to see if it is feasible.

Email :


Top of page

112 . 2011-05-22 01:37:56

Paolo wrote:

Hi Max,

really great work, thanks.

I write you about a problem, about function col_operation

Firefox doesn't include first line in sum. Instead, it's ok with Internet Explorer, Crome and Opera.

To evoid the error in Firefox, i had to insert a blank line, because Firefox begins to sum from second line.

Thanks !

 

Email :


1 Reply

1 . 2011-05-23 18:44:58

Max wrote:

Hi Paolo,

First of all, thanks for using this script. I am not aware about this unexpected behavior under Firefox, I have never seen it before. There is most probably something else going on, I presume...

Email :


Top of page

113 . 2011-05-17 10:08:05

Johnny wrote:

Hi Max,

Great script you got there, really useful and it made my life so much easier thanks ;)

I have one little issue though : I'm using sorting in my tables and i have several date type columns that

need to be sorted. Thing is sorting works great for the first column but for the two following, sorting is quite

random. Would you care to tell me where i've done something wrong ?

Here's the props of my tables (Sorry I can't give you a link to the website, not accessible from the outside..)

 

var props = {
        filters_row_index: 1,
        sort: true,
        sort_select: true,
        sort_config: { sort_types: ['none','String','String','dmydate','dmydate','dmydate','String','String','String','String','String','String','String']},
        fill_slc_on_demand:true,
         remember_grid_values: false, 
        remember_page_number: false, 
        remember_page_length: true,
        on_keyup: true, 
        on_keyup_delay: 200,
        sort: true, 
        remember_grid_values: true, 
        alternate_rows: true, 
        rows_counter: false, 
        btn_reset: false,
        col_0:'none',
        col_6:'select',
        col_12:'select',
        btn_reset_text: "Raz", 
        loader: true, 
        loader_html: '<img src="images/ajax-loader.gif" alt="" style="vertical-align:middle; margin-right:5px;"><span id="\lblStatus\"></span>', 
        status_bar: false, 
        status_bar_target_id: 'lblStatus',
        default_date_type : 'DMY', 
        msg_filter: 'Filtering...',
        sort_images_path: 'css/tableFilter/MyTheme/images/',
        sort_image_blank: 'blank.png' 
   }

        var propsDefault = {
        filters_row_index: 1,
        fill_slc_on_demand:true,
        remember_grid_values: false, 
        remember_page_number: false, 
        remember_page_length: false,
        sort: true,
        sort_select: true,
        sort_config: { sort_types: ['none','String','String','String','dmydate','dmydate','dmydate','String','String','String','String']},
        paging:true,
        on_keyup: true, 
        on_keyup_delay: 200, 
        remember_grid_values: false, 
        alternate_rows: true, 
        rows_counter: false, 
        btn_reset: false,
        sort_select: true,
        col_0:'none',
        col_3:'select',
        col_7:'select',
        col_13:'select',
        help_instructions : false,
        btn_reset_text: "Raz", 
        loader: true, 
        loader_html: '<img src="images/ajax-loader.gif" alt="" style="vertical-align:middle; margin-right:5px;"><span id="\lblStatus\"></span>', 
        status_bar: false, 
        status_bar_target_id: 'lblStatus',
        default_date_type : 'DMY', 
        msg_filter: 'Filtering...',
        sort_images_path: 'css/tableFilter/MyTheme/images/',
        sort_image_blank: 'blank.png'
   }

Email :


1 Reply

1 . 2011-05-20 18:24:42

Max wrote:

Hi Johnny,
I don't see anything wrong from your configurations objects excepeted the fact some properties are repeated (eg. sort, remember_grid_values) but this has nothing to do with your issue...

Email :


Top of page

114 . 2011-05-13 12:56:04

Nathan wrote:

Hi Max,

thanks for your fantastic tool !

But, one question :

I use the col_operation function and everything works fine ! Laughing

But I need in the summary line a comma instead of a dot ,

is that possible ?

BR

Nathan

 

Email : nathan1507 AT googlemails DOT com


2 Replies

1 . 2011-05-17 12:23:04

Nathan wrote:

You are my hero,

thats exactly what I need !Laughing

Thank you very much !!!

 

Email :


2 . 2011-05-13 13:37:31

Max wrote:

Thanks Nathan,
Please refer to those demos in order to set numeric formats:
http://tablefilter.free.fr/data-types-paging-operations.htm
http://tablefilter.free.fr/data-types.htm

Email :


Top of page

115 . 2011-04-28 21:18:42

XtinaS wrote:

I have tried to use the col_width property, but it doesn't appear to be doing anything for me.

The table is a basic table.  The TRs don't have attributes, and the only attributes the TDs have are font-size styles.

The Javascript snippet I'm using:

<script language="javascript" type="text/javascript">
  //<![CDATA[
  var joscomp_props = {
    col_width: ["200px","200px","150px","75px","130px","45px"],
    btn_reset: true
  };\n

  setFilterGrid("joscomp", joscomp_props);
  //]]>
</script>

The reset link shows up fine, the filtering works, and there are in fact 6 columns in the 'joscomp' table, so all of that is fine.  It's just not resizing the input fields at all.

It's spelled correctly (I copied the snippet from the table5 example in the download file, and removed all but what I want), and again, all else is fine.  Except that.

What am I doing wrong?

Email : xtina DOT schelin AT gmail DOT com


1 Reply

1 . 2011-04-29 13:29:03

Max wrote:

Make sure you don't have any other widths expressed in your HTML code in the tds or ths. Have a look to this demo:

http://tablefilter.free.fr/cols-resizer.htm


or filter the Properties column in the demos page (http://tablefilter.free.fr/demos.php) in order to see all the demos using the col_width property. Also refer to my reply (#3) to Selven's comment (#15)

Email :


Top of page

116 . 2011-04-21 00:39:06

John wrote:

Post your comment here...

Email : mg126 AT me DOT com


0 Reply

Top of page

117 . 2011-04-19 07:43:46

Bjorn M wrote:

Hi there,

Pretty cool script you got there. I'm struggeling though to get a certain wanted behaviour to work.

One of my columns is a date in the format dd-mmm-yyyy (like 05-Feb-2011). I got the sorting working by setting 'default_date_type' to 'DDMMMYYYY' and the sort_type for this column to 'date'.

So the sorting working fine, but I also want to be able to filter by date. For example I'd like to put in something like 'Apr-2011' or '2010' in the filter input but this doesn't work. Only entries like '>01-Jan-2010' or similiar work.

How do I get the filtering to behave like described above. (Basically I just want to be able to filter the date column liek a normal string colomn).

Hope you can help.

Cheers,

Bjorn

Email : bjorn AT mywork DOT com DOT au


1 Reply

1 . 2011-04-19 08:13:42

Bjorn M wrote:

I got it myself!

For some reason the config 'default_date_type' broke it. simply by deleting this config and setting the sort_type of the column to 'date' fixed it.

Cheers

Email : bjorn AT mywork DOT com DOT au


Top of page

118 . 2011-04-09 00:17:41

Wayne wrote:

First off Max, just a great utility.

A quick observation, if you have an HTML comment tag ( ) after the element in your table, this can cause the sorting mechanism to not function properly ... it causes the next column to the right to sort ... simple fix ... do not use HTML comment tags in your section.

Now the question ... I have a date column using format DDMMMYYYY, and am using a SELECT filter on this column. However I do not seem able to get the drop-down filter to sort as a true date ... it looks to be sorting ascending on the DD portion of the date instead of on a true date.

  • if DD is same, then sorts as DD-MMM,
  • if DD and MMM are same, then sorts as DD-MMM-YYYY

My filtering Drop-down looks like the bulleted list below (without the bullets):

  • <Show All >
  • 10-Sep-2010
  • 11-Feb-2011
  • 14-Sep-2010
  • 15-Feb-2011
  • 21-Dec-2009
  • 23-Mar-2011
  • 23-Sep-2010
  • 23-Sep-2011
  • 3-Dec-2010
  • 4-Dec-2011

 I have tried everything that I could find (or think of) in the configurations, but obviously I must be missing something.    any ideas?

thanks,

---Wayne

Email : wrpinnow AT charter DOT net


1 Reply

1 . 2011-04-09 01:03:47

Max wrote:

Hi Wayne,
There is no such a sort for select type filters, only string or numeric values are sorted in the drop-down... but you could achieve that by using the on_filters_loaded callback event and some javascript in order to re-arrange the select options as desired. I think it is feasible as the script provides utility functions for date conversions, from string to date object and vice-versa.
If your values are static, you could use the custom_slc_options to write your own values in the desired order. Have a look to this demo http://tablefilter.free.fr/datademo.htm and related doc: http://tablefilter.free.fr/doc.php#grid_drops

Email :


Top of page

119 . 2011-03-23 14:33:56

mcgio wrote:

Hi Max,

great script , thanks a lot for your help !

BR

mcgio

P.S. The next beer I pay for you Laughing

 

 

 

Email :


1 Reply

1 . 2011-03-24 08:59:57

Max wrote:

Thanks mcgio Smile!

Email :


Top of page

120 . 2011-03-23 14:08:32

Onur Kocer wrote:

Hello

Filtering is working but sorting is not working. Can you help me about that issue

i am taking "tf is not defined" error in tfAdapter.sortabletable.js

my table includes thead and tbody. Also i added the script after creating table

var table_Props =  {

                    alternate_rows: true,

                    sort: true,

                    sort_config: {

                        sort_types:['String','Number','Number']

                    },

                    col_0: "select",

                    col_width: ["50%","25%","25%"],

   paging: true,

results_per_page: ['Sayfa',[10,15,20,25,<%=(@data.size>50) ? @data.size : 50%>]],

   rows_counter: true,

rows_counter_text: "Kayıt # ",

   display_all_text: " [ Tümü ] ",

   btn_reset: true,

btn_reset_text: "Temizle",

sort_select: true,

   loader: true,

loader_html: '<img style="margin: 0px 5px; vertical-align: middle" alt="" src="/images/loader.gif"><span>Yükleniyor, lütfen bekleyiniz...</span>',

loader_css_class: 'myLoader'

 };

 setFilterGrid("table",table_Props );

 

Email : onoank2 AT yahoo DOT com


2 Replies

1 . 2012-02-14 15:16:49

Macmonac wrote:

I had the same problem.

The solution is to import  sortabletable.js and tfAdapter.sortabletable.js after tablefilter.js.

Regards

Email : blondeau_pierre AT hotmail DOT com


2 . 2011-03-24 09:17:02

Max wrote:

Hi Onur,
I don't see anything wrong in the configuration object. Make sure the tfAdapter.sortabletable.js and sortabletable.js documents are included in the page, if you haven't done it yet, try to add in the <head> section of your page these 2 lines:
<script src="sortabletable.js" language="javascript" type="text/javascript"></script>
<script src="tfAdapter.sortabletable.js" language="javascript" type="text/javascript"></script>
Double check the implementation steps detailed in this demo: http://tablefilter.free.fr/filter-sort.htm.
Also when you use the setFilterGrid method, you could store the TF object in a variable:
var tf = setFilterGrid("table", table_Props);

Email :


Top of page

121 . 2011-03-22 04:26:09

Greg wrote:

Love the script! Though, I have one issue, or question rather, will the script only work if the required files are sitting within the root folder of the applied pages:

<script language="javascript" type="text/javascript" src="../Scripts/TableFilter/TableFilter.js"></script> The path as defined here will throws an error in IE "Object doesn't support this property or method". I also recieve this error if SRC is set to an absolute path or a site root relative path.

On the other hand...

<script language="javascript" type="text/javascript" src="TableFilter/TableFilter.js"></script> This path works just fine. 

The reason I ask is because I would like to leverage the script across multiple sites but this issue has been preventing me from doing so.

Any thoughts?

Thanks,

Greg

Email : gregw74 AT live DOT com


2 Replies

1 . 2011-03-23 11:32:35

Max wrote:

Hi Greg,
Yes it is normal, tablefilter_all.js contains all the modules of the script in one document. The tablefilter.js document contains a load on demand mechanism importing only the modules required by the features enabled in the configuration object. It is possible that some of the modules you use need to have the src path to be defined according to your location.
It is true that this is not clear, I will try to post a demo in the next version explaining how to configure the script when the local path is different from default one...

Email :


2 . 2011-03-22 05:00:55

Greg wrote:

Sorry, I figured it out. For whatever reason I had to specify tablefilter_all.js instead of tablefilter.js. Still trying to figure out why but at least now I'm able to reference the script from a single location.

Email : gregw74 AT live DOT com


Top of page

122 . 2011-03-12 09:39:13

zettal wrote:

Hi Max :)
Your script is brilliant and easy to implement and customize with your marvelous documentation. It works efficiently, looks great, handles huge tables easily, and your enhancements cover more than I could wish for :D I bow to you and stand in awe! Ingenious code and free, too!
Thank you so much!
Cheers zettal

Email : szettal AT gmx DOT de


1 Reply

1 . 2011-03-13 10:29:15

Max wrote:

Thanks zettal, I appreciate Smile!

Email :


Top of page

123 . 2011-03-11 16:07:35

Reset rows counter after delete? wrote:

I have a question about changing the rows counter  I have a delete column and when the user clicks it it deletes the row by deleting it in php in the background and just hide the row so that I don't have to reload the whole page. Only thing is is that the rows counter has the old number of rows until there is a full page refresh. Is there any way to modify the rows counter without reloading the page?

 

Thanks

Email : lgrella AT acquiremedia DOT com


6 Replies

1 . 2011-03-15 17:28:37

Max wrote:

Laura, make sure the tf and tConfig objects exist inside the jquery s document ready event (alert(tf+' '+tConfig);). If that s not the case, move the configuration object the setFilterGrid and DeleteRow methods inside the jquery document ready event. The TF properties and methods used in the DeleteRow methods do exist, have a look to tablefilter_all.js document

Email :


2 . 2011-03-14 15:22:41

Laura wrote:

Thanks. When i try to call DeleteRow from inside my jqeury function, I get the error:

Message: 'tf.tbl' is null or not an object

when I just try to reference the nbRows inside my function I get

Message: 'tf.nbRows' is null or not an object

Its as if my variable tf which i am setting outside any functions using  var tf = setFilterGrid("grouptable",tConfig);  is not being global. Also, I do not see in any of your code where it has nbRows, nbFilterableRows, deleteRow, or alternameRows ...

here is my code:

      <script>
         
          var tConfig={   
                        col_0:"none",   
                        col_1:"none",
                        col_2:"none",
                        col_3:"none",
                        col_4:"none",
                        col_5:"none",
                        col_6:"none",       
                        col_7:"none",     
                    //    display_all_text: " [ Show all ] "  ,                                                             
                           paging:true,
                        paging_length:25,
                        alternate_rows:true ,
                        results_per_page:['Results per page',[25,50,100]],
                        <?php if(!$new_group){?>
                            remember_page_number: true,
                            remember_grid_values: true,
                            remember_page_length: true,
                        <?php } ?>
                      loader: true,                         
                      status_bar: true,                       
                        rows_counter: true,
                         rows_counter_text: "Displayed rows: ",
                     
                        default_date_type: "mdy",
                        col_date_type: [null,null,null,null,'mdy',null,'mdy',null],
                       
                     
                        sort: true,
                        sort_config: {
                        sort_types:['CaseInsensitiveString','CaseInsensitiveString','CaseInsensitiveString','CaseInsensitiveString','mdydate','none','mdydate','none']
                        }     ,
                        msg_sort: 'Sorting...'
                        
                    }
                //]]>
                 
                 var tf = setFilterGrid("grouptable",tConfig); 
                 
                 function DeleteRow(rowIndex){
                    tf.tbl.deleteRow(rowIndex);
                    tf.nbRows--; //the total number of the rows needs to be referenced again
                    tf.nbFilterableRows--; //the number of filterable rows needs to be referenced again
                    tf.RefreshNbRows(tf.nbFilterableRows); //nRows is the new rows number
                    if(tf.alternateRows) tf.SetAlternateRows(); //in case zebra rows is enabled
           
                }
                 
$(document).ready(function()
{
    if($('#user_id'))
    {
        var user_id = $('#user_id').val();       
    }

    if($('#group_id'))
    {
        var group_id = $('#group_id').val();       
    }
   
    if($('#account_id'))
    {
        var account_id = $('#account_id').val();       
    }
             // delete user
    //////////////////////////////////////////////////////////////////////////
    $(".buttondelete").click( function() {
           
        theaction = 'deleteuser';
        var answer;
       
        var product =  '';
        var userName = this.rel;
        var fullID = this.id;       
        var indexofdelete = fullID.indexOf('delete');
        var row_num = fullID.substring(0,indexofdelete);
        var userID =  fullID.substring(6+indexofdelete); // remove 'delete from id
       
        alert( "number of rows"+ tf.nbRows );
       
        // DeleteRow(row_num);
       
        answer = confirm('DELETE user " ' + this.rel + ' " ?');
       
        if(answer)
        {               
            if(confirm('THIS ACTION CANNOT BE UNDONE.\n\nDo you really want to delete user " '+this.rel+' " ?'))
            {
 
            $.get("/service.php", { action: theaction, user_id: userID,product: product },
                function(data){
                     
                      alert('Deleted user '+userName+' ID:'+userID);
                
                     DeleteRow(row_num);
                  
                });
 
            }
        }
        return false;
    });

});
             
        </script>


Email : lgrella AT acquiremedia DOT com


3 . 2011-03-13 11:17:26

Max wrote:

Laura,
The TF object is returned by the setFilterGrid function instanciating the TF object:
...
var tf = setFilterGrid("demos", demos_config);

and below an example of function deleting a row that should be called from your code:
...
    function DeleteRow(rowIndex){
        tf.tbl.deleteRow(rowIndex);
        tf.nbRows--; //the total number of the rows needs to be referenced again
        tf.nbFilterableRows--; //the number of filterable rows needs to be referenced again
        tf.RefreshNbRows(tf.nbFilterableRows); //nRows is the new rows number
        if(tf.alternateRows) tf.SetAlternateRows(); //in case zebra rows is enabled

    }
...
You will need to provide the index of the row to be deleted.

Email :


4 . 2011-03-13 01:38:44

Laura wrote:

Max,

Maybe I am being dense here, but I am stuck....if I am deleting the row in a separate file from a php call invoked by a jquery call, where and how would I set my tf object so that it can be used in the jquery function call in the separate .js file?

 

Thanks

Email :


5 . 2011-03-13 00:53:30

Laura wrote:

Thank you so much! I will try this.

Email :


6 . 2011-03-11 22:33:01

Max wrote:

Hi,
Yes, you can use the RefreshNbRows(nRows) method to set the rows number and update the nbRows property that references the number of rows of the HTML table and the nbFilterableRows property that reference the number of filterable rows, below an example of code to add once a row is deleted from your HTML table:

...
//tf = your TF object
tf.nbRows--; //the total number of the rows needs to be referenced again
tf.nbFilterableRows--; //the number of filterable rows needs to be referenced again
tf.RefreshNbRows(tf.nbFilterableRows); //nRows is the new rows number
if(tf.alternateRows) tf.SetAlternateRows(); //in case zebra rows is enabled

Email : tablefilter AT free DOT fr


Top of page

124 . 2011-03-08 22:05:01

Nemo wrote:

Is it possible to have other than text/string in the cell? I have small icons,buttons, and links in cell. Even if I don't sort using those columns, I still having problem with the sort feature. It sort very randomly.

Is that a known issue or should I provide more details?

 

By the way, great plugin, very helpful.


Thanks,

Email :


2 Replies

1 . 2011-03-10 18:47:51

Nemo wrote:

Thank you for your reply,

I will export part of my table with the code and send to you.

Thank you very much

Email :


2 . 2011-03-09 08:42:24

Max wrote:

Hi Nemo,
Please provide more details, or a working example with the sort issue.

Email : tablefilter AT free DOT fr


Top of page

125 . 2011-02-28 13:54:09

Girts wrote:

Hi,

How to install this into my site? And how to get data from my MYSQL DB?

 

 

Email : gkazhus AT inbox DOT lv


0 Reply

Top of page

126 . 2011-02-24 13:56:59

Salman wrote:

Hi There,

 

I have a table that has its last two rows as summary rows. I dont want those rows to be considered for sorting or filtering. Following two lines have fixed the filtering problem. But I am unable to get around the sorting problem

var totRowIndex = tf_Tag(tf_Id('bugDetailsTable'),"tr").length;

rows_always_visible:[totRowIndex, totRowIndex-1],

 

Is there any property that can be used to selectively disable solrting on some rows?

Email : salman DOT kagzi AT gmail DOT com


2 Replies

1 . 2011-02-26 12:31:56

Max wrote:

Hi Salman,
have a look to this demo page http://tablefilter.free.fr/data-types-paging-operations.htm it seems to me both issues are included in this sample. Concerning the rows counter let me know if you can figure it out.

Email :


2 . 2011-02-25 12:15:39

Salman Kagzi wrote:

I have found a solution to this. I now have the summary (not supposed to be sorted or filtered) in TFoot tag of that table. It seems that Sort & Filter is only applied on the rows in TBody tag.

 

But now I have 2 other minor issues.

1. When I enable alternate coloring of rows, it is also applied on the rows in TFoot. I do not want that to happend (as it has some selective coloring). Is there a way to this?

2. The row count (generated using rows_counter: true) is inclusive of the number of rows in tfoot tag. This is incorrect for my table layout. I only want to give it the count of rows in TBody tabe. Can this be done?

 

Thanks in advance.

-Salman

Email : salman DOT kagzi AT gmail DOT com


Top of page

127 . 2011-02-09 21:09:11

Laura wrote:

 I have been using the script very sucessfully for quite a while now, and my code works on FF and IE8 but when put on IE7, I get a javascript error as follows:

Message: 'this.tbl.rows' is null or not an object
Line: 2676
Char: 3
Code: 0
URI: http://laura-dev:8080/assets/js/tablefilter.js

 

 

I tried to modify my tConfig to make is as simple as possible to eliminate the problem but it does not help. This is my simplified tConfig code:

  var tConfig={   
            paging:true,
            paging_length:25,
            alternate_rows:true 
                    }
         
   setFilterGrid("group",tConfig); 

 

I get the javascript error before any paging, filters or alternate rows are done. This works on FF and IE8 but not IE7.

the table it is set for is: (with $tablerows filling in the rows).

<table border="0" cellpadding="4" cellspacing='0' width="100%" class='tablesorter' id='group'>
             <thead>
                <tr>
                    <th width='75'>Enabled</th>
                    <th>Login Name</th>
                    <th>User</th>
                    <th>Email</th>
                    <th width='100'>Last Login</th>
                       <th width='50'>Online   </th> 
                    <th>Expires</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
            <?php echo $tablerows; ?>
            </tbody>

Email : lgrella AT gmail DOT com


1 Reply

1 . 2011-02-09 21:22:57

Laura wrote:

Nevermind...found my problem...IE7 didnt like when i named my table the same as a hidden text object. Fixed now.

Email :


Top of page

128 . 2011-02-03 19:26:33

Ken wrote:

Apologies if this question is easily answered by the docs/examples. I have looked over them but can't find the answer.

I'm wondering if I can limit the entries in a Select drop-down to just some of the row entries that appear in the column, and if selected would select for the rows between it and the next select entry?   for instance, if my column has the following row entries: A,1,2,3,B,4,5,6,C,7,8,9  I want the select menu to just have A,B,C and if A is selected it will show the rows A,1,2,3, or if B is selected then B,4,5,6. 

I guess I'm wondering if there's a class or attribute I could define in the <td> tag that would group the rows under a certain heading?

thanks!

ken

Email :


4 Replies

1 . 2011-02-12 16:48:07

Max wrote:

Hi Ken, there is no such mechanism in place, and the relation between the columns is not clear, an empty cell means a separation between groups... I think you could acheive that by using some of the scripts callback events and some javascript.

Email :


2 . 2011-02-10 18:23:42

Ken wrote:

oops... i messed up my example... in the first table the 5th row should be a "B" not a "C".

Email :


3 . 2011-02-10 18:22:06

Ken wrote:

Hi Max,

Thanks for the reply.  I don't think refresh_filters addresses what I'm trying to do. (but correct me if I'm wrong!) To clarify here's an example table.   In the following table I want a Select filter at the top of the first column with just A,B,C.

A

 
1 a
2 b
4 c
C  
4 a
5 b
6 c
C  
7 a
8 b
9

c

 

 

 

 

 

 

 

 

 

 

 

 

And selecting B would filter the table to:
B  
4 a
5 b
6 c

 

 

 

 

Does that make sense, and is there a mechanism to do that?

Thanks again!

ken

Email :


4 . 2011-02-04 23:50:46

Max wrote:

Hi Ken, I am not sure I understood correctly your question. Have you tried the refresh_filters property, shown in http://tablefilter.free.fr/ex.php#tbl10 sample?

Email :


Top of page

129 . 2011-01-27 21:43:12

Selven wrote:

Heya, i've tried to integratetablefilter to my wikimedia here: http://golarion.altervista.org/wiki/Database_Talenti i've followed the example code but it don't works, can you help me?
Ps: there is documentation about how interate the script and a complete list of fnctions?

Email : lip81 AT libero DOT it


7 Replies

1 . 2011-01-30 19:33:51

Max wrote:

You could use the flt_css_class property in your config object to customise the filters appereance for example...
http://tablefilter.free.fr/doc.php#grid_appear

Email :


2 . 2011-01-29 15:14:43

selven wrote:

i know hot to set the width of an column and i like them as they are, dinamically, i have problem with filter field that get out of autogenerated size of column, i can solve the problem changing the wdth in stilegrid.css from 100% to 95% but the margin from right will change....
Damn i  forgot margin!!!

Now i try setting margin to field....

Email :


3 . 2011-01-29 14:48:55

Max wrote:

Selven,
It's just an HTML table, you may decide to affect column widths in the HTML code (<th width="200" ...) or by using inline style attribute (<th style="width:200px;" ...) or by setting widths in an external stylesheet, or even by using the col_width property in the configuration object. Have a look to the source code of the demos to see how these values are affected.

Email :


4 . 2011-01-28 18:03:38

selven wrote:

You right i was really tired when i've tried the trick, now it works, having an empty table the javascript works also on pages without a real database table, now i have only the little problem about the fact of field of filter get out of size of columns: http://golarion.altervista.org/wiki/Database_Talenti as you can see there.

Suggestion on how to fix this?

 

Email :


5 . 2011-01-28 13:33:14

Max wrote:

Selven, it's just a question of  HTML syntax and not the fault of the script ...
You wrote <table id"database"> instead of <table id="database">
This script has many behaviours and in order to configure your object have a look to the demos, examples and documention pages:

Email :


6 . 2011-01-28 00:20:12

selven wrote:

Here i am again find the css, still have problem because if 100% generate problem with wdth using minus scale is not too much cool.

Another problem is the fact that being all page generated dinamically i cannnot include the part:

  <script language="javascript" type="text/javascript">  
  //<![CDATA[  
   var database_Props = {  
     filters_row_index: 1
    };  
   var db = setFilterGrid( "database",database_Props );  
  //]]>  
  </script> 

only on page of my interest and the page that don't have database table get me javascript error for example: http://golarion.altervista.org/wiki/Pagina_principale

there is a way to check if table is present and if not truncate script without error?

Email :


7 . 2011-01-27 23:42:45

Selven wrote:

Solved misconfiguration abut position of file and url rewrite Embarassed

Now i have just a little problem about width of insertion field, where is setted?

Email :


Top of page

130 . 2011-01-24 20:01:33

Laura wrote:

I have been using the filtergrid for some time now and it is a wonderful and useful script, and have some requests from my users and was wondering if either of them are possible.

  1. 2 of my columns in a grid are ‘Active and ‘expiration date’. Both columns are being filtered, but they wish to add additional filtering on the Active column. They want to have selections – “Not Active, Active, Active and expired’ and ‘Active and not expired’. So what they really want is the combination of 2 columns but controlled by one column, but they still want the ability to filter the Active column by just active or not active as well. Is this possible?
  2. The second question has to do with the paging if I click on a link in the grid I want to go back to the page I came from. For example – my grid had a column called Login Name. When you click on the login name, it is actually a link that goes to a user preferences page. If the user is on the 4th page of my grid, and the login name is clicked, when they modify the user’s preferences and click ok, it goes back to the grid, but always goes back to the first page of the grid. Is there anyway that the page number can be remembered so that when it goes back it goes back to the last page where the most recently clicked login name is?

 

Thanks

Email : lgrella AT acquiremedia DOT com


1 Reply

1 . 2011-01-25 13:14:05

Max wrote:

  1. You could use an external filter setting values on the 'Active' column filter and 'expiration date' column filter at the same time, the script API provides a whole set of methods to interact with the script (SetFilterValue methods), have a look to the demos, programmability tab http://tablefilter.free.fr/demos.php and to the public methods: http://tablefilter.free.fr/doc_methods.php
  2. By enabling the ...remember_page_number: true... property in your configuration object you will be able to keep the selected page of the pagination when the document is reloaded, http://tablefilter.free.fr/doc.php#grid_behave

Email :


Top of page

131 . 2011-01-06 15:22:55

Michael wrote:

Hey,

This is a great script, though i've encountered something of a bug.
If you have text data in a field, for example: 'My website uses this script to make you able to sort this table',
If you search for words in the sentence like this: 'Sort website', it will return 0 rows.

How can i fix this?

Thanks in advance

Email : verindica AT live DOT com


1 Reply

1 . 2011-01-07 09:39:33

Max wrote:

Hi Micheal,
this is not a bug, the script searches for a string 'Sort website' which is not present in your text. Have a look to the operators on the home page (Filter operators) and try this: Sort || website. All occurences of sort or website will be filtered.

Email :


Top of page

132 . 2010-12-24 20:03:13

Fahim wrote:

Hi there,

Great script!

I have one issue. I am using the script with the tablesorter addon but I am unable to get the up and down arrows to show. I am pretty sure it's to do with the image paths.

I can see that default unsorted image appears but it stays the same when I sort.

I updated the image_path variable in tfAdapter.sortabletable.js

I noticed these images being referenced in filtergrid.css file also and I left the image referenced relative to the folder but no luck.

 

any ideaS?

Email : fahimsalim AT gmail DOT com


2 Replies

1 . 2010-12-25 01:46:54

Fahim wrote:

I managed to get it working by removing the following property from the props variables - "async_sort:true".

Not sure why that would have caused it.

However, I have noticed that with for a column you don't want to sort even if you put null it still shows the arrows and sorts it. any ideas how to disable sorting for a particular column?

Email : fahimsalim AT gmail DOT com


2 . 2010-12-25 01:00:43

Fahim wrote:

Just some more info if it helps. I noticed in firebug that when I sort on a column the correct class is not being applied to the <img> tag. For example it always stays as :

 

"<th width="135px" style="cursor: pointer;" _sorttype="string">network<img src="/js/table_filter/img/blank.png"></th>"

I think when you sort the following one class should be applied: .sort-arrow.descending or .sort-arrow.ascending  right?

Email : fahimsalim AT gmail DOT com


Top of page

133 . 2010-12-20 02:36:31

Oliver Gonzales wrote:

Hi! I find your script pretty and amazing!

I usually use it with the TableSorter extension. I find it very useful and simple.

However, I am receiving feedbacks from (mostly older) users wherein they prefer the Excel-like filtering functions which uses a context menu to filter the columns by selecting multiple items from a checkbox list, select blanks and non-blanks.

I think it will be a very useful addition to your arsenal of interface options! I really hope this suggestion will be aded in your To do. Thank you.

Email : ovpgonzales AT gmail DOT com


3 Replies

1 . 2011-01-05 08:58:51

Oliver Gonzales wrote:

Thanks, Max. Just the thing I am looking for. God speed!

Email :


2 . 2011-01-05 08:58:03

Oliver Gonzales wrote:

Post your comment here...

Email :


3 . 2010-12-20 08:44:46

Max wrote:

Hi Oliver,
Thanks for using this script, actually there are already some of the functions you mention, have a look to these demos for example: http://tablefilter.free.fr/custom-theme.htm, http://tablefilter.free.fr/theme.htm

Email :


Top of page

134 . 2010-12-16 18:13:23

Forestgreen wrote:

Hi, thank you for this wonderful code.

I am using it together with the tablesorter Extension.

Everything works well for me, except one thing: the css formatting of the table header does not work at all for some reason. Maybe the path to one folder needs to be adjusted?

Has anyone got a similar problem?

Email : cdg DOT forestgreen AT gmail DOT com


1 Reply

1 . 2010-12-17 19:03:56

Max wrote:

Hi, if you don t use a theme (Default or MyTheme), the default stylesheet (filtergrid.css) does not provide a css style for column headers, you need to define your own style.

Email :


Top of page

135 . 2010-11-24 16:18:33

JAY wrote:

Hi, first very good and powerful easy to use script

I have an idea to make the filter function more powerfull:

When you filter a table to a specific keyword you get a shorter table as result, but when you want to filter this shorter table more it is not possilbe so if you hit another keyword with the short table it searches the whole table again.

Can anybody help me maybe there is the function always possible and I am only to studpid to see...

 

Thanks JAY

Email :


0 Reply

Top of page

136 . 2010-11-24 10:56:57

Tom wrote:

 

I am a chinese student,I have a 10-line 4-column table,I use the code "rowspan=10" in the first column,when the PAGE COUNTER working,it dispaly {1-10/ 10}, but i want it display(1-1/1) (which according to the first column). thanks for you time

Best Regards!

Email : xiongwei1988610 AT gmail DOT com


0 Reply

Top of page

137 . 2010-11-19 12:21:13

DragonLord wrote:

When I add col_operation and paging elements, rows_always_visible doesn't work?

any solution?

thanks

Email : dragonlord888 AT hotmail DOT com


1 Reply

1 . 2010-11-24 13:33:47

Max wrote:

The issue is the paging and rows_always_visible combination. I made a test and at present time it is not possible to make both properties work together without changing the script. I note this issue and hopefully it will be available in the next revision of the script...

Email :


Top of page

138 . 2010-11-15 00:48:17

Carl wrote:

Not sure if you can help me with this one but I have noticed in a few posts people have mentioned table data being held on a database. I only have a basic understanding of databases.

Can anyone point me to an idiots guide anywhere on the internet or help explain the steps needed?

I am entering data into a table based on Max's script all the time. I eventually want other select people to be able to enter data themselves through either a website input form or through a spreadsheet that can upload to it? It needs to have the ability for a person to upload a photo for the entry as well. Is there anyway a person can connect to a database to do that?

Any clues?

Email :


0 Reply

Top of page

139 . 2010-11-11 13:14:59

2 custom_slc_options? wrote:

I was trying to have two drop downs with custom_slc_options

 

i defined one on column 0 and it works fine if it is the only one

i defined one on column 7 and it works fine if it is the only one

when i put them both in at the same time the first one is ignored, i tried it with having two "custom_slc_options" as listed below and as one  and neither worked....

 

   var table1_Props =  {
                    col_0: "select", 
                                      custom_slc_options: {
                                           cols:[0],
                                           texts:[['1',
                                                   '2',
                                                   '3',
                                                   '4',
                                                   '5',
                                                   '6',
                                                   '7']],
                                           values:[['18A||18B',
                                                    '19C||19X||19F||19L',
                                                    '20C||20L',
                                                    '21C||21R',
                                                    '22C||22L||22S',
                                                    '23C||23L',
                                                    '25C||25S||25L']],
                                           sorts:[false]},
                    col_1: "select",
                    col_2: "select",
                    col_3: "select",
                    col_4: "select",
                    col_5: "select",
                    col_6: "select",
                    col_7: "select",
                                    custom_slc_options: {
                                           cols:[7],
                                           texts:[['US','Intl']],
                                           values:[['US Only||Anywhere','Intl Only||Anywhere']],
                                           sorts:[false]},
                    col_8: "none",
                    col_9: "none",
                    col_10: "none",  
                    col_11: "none", 
                    col_12: "none", 
                    col_13: "none",
                    col_14: "none", 
                    display_all_text: " All ",
                    alternate_rows: true,
                    sort_select: true
                };

 

If i remove either of them it the drop down works fine, but when i put both of the custom_slc_options in there only the last one defined worked....i tried combining them into one custom_slc_options  after col_14 (above) like:

                                      custom_slc_options: {
                                           cols:[0],
                                           texts:[['1',
                                                   '2',
                                                   '3',
                                                   '4',
                                                   '5',
                                                   '6',
                                                   '7']],
                                           values:[['18A||18B',
                                                    '19C||19X||19F||19L',
                                                    '20C||20L',
                                                    '21C||21R',
                                                    '22C||22L||22S',
                                                    '23C||23L',
                                                    '25C||25S||25L']],
                                           sorts:[false],

                                           cols:[7],
                                           texts:[['US','Intl']],
                                           values:[['US Only||Anywhere','Intl Only||Anywhere']],
                                           sorts:[false]

                                      }

 

Is it just not possible to do it on two different drop downs?

Email :


2 Replies

1 . 2010-11-11 20:30:05

mp99 wrote:

I see that now...i looked at the docs and didn't understand what it was doing, but now i do.

 

Thanks again!

Email :


2 . 2010-11-11 20:22:28

Max wrote:

This is the right syntax:
...
    custom_slc_options: {       
        cols:[0,7],
                texts: [['1','2','3','4','5','6','7'],['US','Intl']],                      
        values: [
                ['18A||18B','19C||19X||19F||19L','20C||20L','21C||21R','22C||22L||22S','23C||23L','25C||25S||25L'],
                ['US Only||Anywhere','Intl Only||Anywhere']
            ],   
        sorts: [false,false] },
...

as described in the documentation:
http://tablefilter.free.fr/doc.php#grid_drops

Email :


Top of page

140 . 2010-11-10 22:36:33

mp99 wrote:

is there any way to not get the dropdown/selection boxes to print?

 

i know how to make things not print using css but if i had to to thead i lose my headers when i really only want to not print the "dropdown or selection" boxes....

 

 

Email : mpacker99 AT gmail DOT com


3 Replies

1 . 2010-11-11 15:25:41

Max wrote:

Thanks for the donation, I appreciate it Wink!

Email :


2 . 2010-11-11 12:54:39

mp99 wrote:

Thanks...i didn't realize the filter row had it's own class (doh)!

 

ended up using:

 

 <style>
@media print {
  .fltrow { display:none; }
}
 </style>

 

worked perfectly!  thanks!

Email :


3 . 2010-11-11 08:41:17

Max wrote:

You can achieve that with a css for print media. For instance, if you want to hide all the filters you could hide the row containing the filters, that row is generated by the script has a .fltrow class, so to hide it would be something like:

.fltrow{ display:none !important; }

Email :


Top of page

141 . 2010-11-07 09:34:57

Gabriel Anzziani wrote:

After many hours of work, I have finally succeded in using the filter table with sorting, I am happy with the results:

Oscilloscopes for Hobbyists

I would suggest adding to the instructions which files need to modified in case you don't use the default paths, this is something that took me some time to figure out. Also add a note to indicate how to include the CSS files.

Email : gabriel AT gabotronics DOT com


2 Replies

1 . 2010-11-24 09:01:26

Banks wrote:

Hello Max,

you've done a great job, but i agree with Gabriel! You should explain how to implement a full project( inclunding .html, .css and etc...).That will be very usefull to understand.

Back to my problem, i've tried since many hours to implement your example(filter-sort.htm), but it doesn't work :(!

Could you see it, please?

King regards

Email : afcoeur AT gmail DOT com


2 . 2010-11-11 08:45:56

Max wrote:

Gabriel, could you please explain what you found difficult to implement exactly concerning the CSS files, so I have a better idea of what needs to be improved in the documentation?

Email :


Top of page

142 . 2010-11-01 15:53:47

Revathi wrote:

I have thousand of records to be displayed. I have given the pagination length as 8. Initially while loading the entire set of records are getting displayed and then the pagination takes place which affects the performance. Is there any optimal way to reduce this loading time where the entire set records getting displayed before pagination.

Thanks in advance.

Email : nivyarevathi AT gmail DOT com


2 Replies

1 . 2010-11-15 10:52:53

Revathi wrote:

Hi Max,

I tried to call SetFilterGrid function on the onload of the window. But, I get javascript error 'Object Required'.

window.onload =

function(){ setFilterGrid( "TableName",tablelist_config ); }

Kindly help me where I'm wrong.

Thanks

Email : nivyarevathi AT gmail DOT com


2 . 2010-11-02 12:59:07

Max wrote:

What you could do is to call the script once the page is loaded, that is, invoke the setFilterGrid function on the onload event of the window.

Email :


Top of page

143 . 2010-10-20 16:19:48

multiple select, forcing an item based on other selections wrote:

I've got a weird table that has three options:

 

Anywhere

US

Intl

 

What they select "US" i really want it to automatically select "US and Anywhere" and when they select "Intl" i want it to show data for "Intl and Anywhere".  

 

Any ideas on how to implement this?

Email : mpacker99 AT gmail DOT com


2 Replies

1 . 2010-10-25 14:57:35

mp wrote:

Thanks!  That worked perfectly....just didn't understand how to do it.  Now the custom_slc_options makes more sense :)

 

Email : mpacker99 AT gmail DOT com


2 . 2010-10-21 13:35:40

Max wrote:

You could use the custom_slc_options to do so. Have a look to this demo page http://tablefilter.free.fr/datademo.htm to see how to use it and also this doc page http://tablefilter.free.fr/doc.php#grid_drops. Below an example of config for your case:

yourConfigObj = {
    ...
    col_0: 'select',
    custom_slc_options: {
            cols:[0],
            texts: [['US','Intl']],
            values: [['US || Anywhere','Intl || Anywhere']],
            sorts: [false]
     },
    ...
}

Email :


Top of page

144 . 2010-10-12 04:53:55

Robert wrote:

  1. I just started using your filter and I must say it is great!
  2. I have a column of checkboxes and I tried setting up a filter for it, just as you have it in your example: http://tablefilter.free.fr/custom-data.htm
  3. The only thing is that my table initially has no check boxes selected at all, and then the user would select some. Because of this the filter is only populated with 'no', and that stays the same even after selecting a few of the checkboxes. 
  4. I tried setting refresh_filters but it didn't help. Any other suggestions? I wouldn't mind having both 'yes' and 'no' in my filter initially, even when there are no checkboxes selected at all.
  5. This is what i have now (from your example):
  6.  custom_cell_data: function(o,c,i){     
  7.         if(i==0)   
  8.         {   
  9.             var chk = c.getElementsByTagName('input')[0];   
  10.             if(!chk || c.parentNode.parentNode.parentNode.nodeName=='TFOOT'return '';   
  11.             if(chk.checked) return 'yes';   
  12.             else return 'no';   
  13.         } else {   
  14.             var slc = c.getElementsByTagName('select')[0];   
  15.             if(!slc) return 'none';   
  16.             else return (tf_isIE) ? slc.options[slc.options.selectedIndex].firstChild.data : slc.value;   
  17.         }   
  18.     }, 
  19. Thank you!!!

 

Email : stefanvig AT gmail DOT com


7 Replies

1 . 2010-10-15 21:12:33

Robert wrote:

This works great!!!

The only things i had to change is to use getFullYear() because my date format is in form of '2010', and use '>' instead of '<' under the custom_slc_options values because i want to see entries that are not older than 1 or 2 weeks.

Thank you again so much for your help! I really appreciate it.

Email :


2 . 2010-10-15 14:43:49

Max wrote:

I submitted the comment below by mistake. Try something like this:

var oneWeekAgo = new Date();
oneWeekAgo.setDate(oneWeekAgo.getDate() - 7);
var oneWeekAgoStr = oneWeekAgo.getYear() + '-' + (oneWeekAgo.getMonth() + 1) + '-' + oneWeekAgo.getDate();
var twoWeeksAgo = new Date();
twoWeeksAgo.setDate(twoWeeksAgo.getDate() - 14);
var twoWeeksAgoStr = twoWeeksAgo.getYear() + '-' + (twoWeeksAgo.getMonth() + 1) + '-' + twoWeeksAgo.getDate();

yourConfigObj = {
    ...
    custom_slc_options: {
            cols:[x],
            texts: [['< 1 weeks ago','< 2 weeks ago']],
            values: [['<'+oneWeekAgoStr,'<'+twoWeeksAgoStr]],
            sorts: [false]
     },
    ...
}

I havent tested it, let me know

Email :


3 . 2010-10-15 13:51:00

Max wrote:

Hi Robert, there is no such an example available. I think this can be done by using the custom_slc_options and some javascript like

Email :


4 . 2010-10-13 21:37:03

Robert wrote:

One more quick question if I may...

I have a column of dates ('YMD') and I was just trying to find an example for a drop-down filter that would have options like '< 1 weeks ago', '< 2 weeks ago'...  (would show only entries that are not older than 1 week or 2 weeks...)

I would appreciate any suggestions.

Thank you again for your great work!!!

Email :


5 . 2010-10-13 19:50:52

Max wrote:

Many thanks Robert for your donation Smile!

Email :


6 . 2010-10-13 19:35:53

Robert wrote:

This worked! Thank you so much, Max!

Email :


7 . 2010-10-13 13:28:21

Max wrote:

Hi Robert,

what you need to do in your case is just to use the custom_slc_options option that defines the options in the drop-down filter (yes and no in my demo page). Just place this piece of code in your cofiguration object :
...
custom_slc_options: {
            cols:[0],
            texts: [['yes','no']],
            values: [['yes','no']],
            sorts: [false]
 },
...
and that's all.
I have a working example, give me a sign if you need it.

Email :


Top of page

145 . 2010-09-20 05:58:09

Esteban wrote:

I have a question, the script seems to behave awkwardly when one of the cells of the table running the script contains another table. Is there any limitation of this kind or should I look harder to find my mistake?

Thanks,

Esteban

Email : titu00 AT gmail DOT com


1 Reply

1 . 2010-09-20 13:30:01

Max wrote:

Esteban, this is a known issue that will be fixed in the next release... In the meantime here you have the fixes:

  1. Locate the _Filter method and change the following line:
    var cell = tf_Tag(row[k],'td'); //(ln 3724 on my editor - tablefilter_all.js)
    with:
    var cell = row[k].cells;
  2. Locate the _PopulateSelect method and do as above (ln 2242 on my editor - tablefilter_all.js)
  3. Locate the _PopulateCheckList method and do as above (ln 2472 on my editor - tablefilter_all.js)
  4. Locate the GetTableData method and do as above (ln 4008 on my editor - tablefilter_all.js)
  5. Locathe the GetCellsNb and replace the following lines:
    var n = tf_GetChildElms(tr); //(ln 3977-8 on my editor - tablefilter_all.js)
    return n.childNodes.length;
    by this line only:
    return tr.cells.length;

This should be enough to correct the problems for cells containing html tables.

Email :


Top of page

146 . 2010-09-17 10:37:06

jenny wrote:

love it! thanks a lot!

Email :


0 Reply

Top of page

147 . 2010-09-08 00:34:42

Don Martin wrote:

Post your comment here...

Note that I have left the instruction "Post your comment here..."  That is the subject of my comment: to have greyed out text in the filter text area that supplies instructions for the end user. 

This is similar to the 'display_all_text' instruction for select columns except it would be unique for each text column. 

Personally, I thought that anyone who has ever used Excel would understand the search procedure, but my end users seem to need a little more.  They are unaware of the purpose of the text boxes at the top of the column.  I could put an additional line of text, but this would make the page more compact. 

Love the filter.  It has made my life easier.

...Don

Email : donald DOT r DOT martin AT kp DOT org


8 Replies

1 . 2010-09-15 21:49:26

Don Martin wrote:

Max,

I emailed a zip file from my personal email yesterday. 

Thanks,

...Don

Email : donald DOT r DOT martin AT kp DOT org


2 . 2010-09-14 13:34:48

Max wrote:

Do you have any javascript error? The fact that the demo is ok confirms the fact that the problem is specific to your page, may be other scripts... Did you test the table with the HTFG script only on a blank page? If you don t manage to isolate the pb send me a html page (no server-side code please) recreating the bug. Below my email

Email : tablefilter AT free DOT fr


3 . 2010-09-13 22:46:35

Don Martin wrote:

Here is my current configuration:
                            col_1: "select",
                            col_4: "none",
                            sort_select: true,
                            display_all_text: "< Select Folder >",
                            on_change: true,
                            btn_reset: true,
                            input_watermark: 'Search...',
                            bnt_reset_text: "Clear all ",
                             sort: true, 
                            filters_row_index: 1, 
                            rows_counter: true, 
                            rows_counter_text: "Displayed rows: ", 
                            status_bar: true, 
                            fill_slc_on_demand: true, 
                            enable_empty_option: true, 
I found that the "remember_grid_values: true," has an interesting effect.  Currently the page appears with all rows and the first search results in 0 rows.  With "remember_grid_values: true,"  the last search string appears and the record count is 0, again reset straightens it out.

 

Hope this helps....

..Don

Email : donald DOT r DOT martin AT kp DOT org


4 . 2010-09-13 19:19:22

Don Martin wrote:

Max,

1)  Cleared cookies and retested.  Behavior did not change--doesn't work unless reset.

2)  Tested demo page.  No Problems. 

 

...Don

Email : donald DOT r DOT martin AT kp DOT org


5 . 2010-09-10 22:03:53

Max wrote:

Don, try to clear your browser cookies, maybe there are values stored belonging to the old version of the script. Do you have the same problem on this demo page http://tablefilter.free.fr/theme.htm ?

Email :


6 . 2010-09-10 21:30:32

Don Martin wrote:

Max,

I'm in the process of testing the input_watermark on my dev system.  I can view the watermark. 

Here is some more information about the first search not working.  When I open the page, the search does not work, if I 'reset' the search it works.  If I reload the page it doesn't work again. 

Thanks  ...Don

 

Email : donald DOT r DOT martin AT kp DOT org


7 . 2010-09-10 20:14:42

Don Martin wrote:

Thanks Max.  I needed to upgrade from version 1.6 to 1.98.

However, there is a bug.  The watermark is working, but my fist search always returns no nows.  Subsequent searches work fine.  Is there a string that I need to initialize?

 

using v.1.98

tablefilter_all.js

filtergrid.css

 

Thanks again...

...Don

Email : donald DOT r DOT martin AT kp DOT org


8 . 2010-09-09 13:35:36

Max wrote:

Hi Don, did you try the input_watermark feature with your end users ?...Wink

Email :


Top of page

148 . 2010-09-06 15:35:22

Arpit wrote:

Hi Max,

I am using tablefilter on one of my screens in project. The issue I am facing is when there is around 500 rows in table. If I try to filter the data by writing text in textfield present on the top of column. It gives me error as

"Stop running this script?
  A script on this page is causing internet explorer to run slowly
  If it continues to run your computer might become unresponsive."

When I dig into the javascript code I found out that, it takes a lot of time in

tf_UnhighlightWord and tf_HighlightWord function. Is there any way to reduce time consumed in this function? Any pointers will be of great help.

Email :


1 Reply

1 . 2010-09-09 13:24:25

Max wrote:

Hi Arpit,
it's true the keywords highlighting feature seems to be very slow with old versions of IE and more specifically the createElement method and other DOM related methods. What could do, is implement your own alternative highlighting feature by using the on_row_validated event, which is fired just after a row is validated, and then do your own logic to hightlight the searched keyword, maybe with a regular expression which is more efficient in terms of performance.

Email :


Top of page

149 . 2010-09-04 00:28:01

remoto wrote:

Merci for such a wonderful script, it implies a lot of work and I really appreciate that!

 

I just have a simple question, is there any way to put a default value on any colum at grid generation?

In other words, I want to start with the table all filtered down, with NO records shown. Is that possible?

I already have col_0 with two values, 0 or 1, I want to start with 0 so it will not show any rows, is that possible?

 

Thanks again, great job!

 

Remoto

Email : remoto AT adinet DOT com DOT uy


2 Replies

1 . 2010-09-06 09:20:36

Max wrote:

Hi Gustavo, I appreciate you took time to explore the script's documentation and examples... Quite a boring activity Tongue out
Concerning point #2, the custom_slc_options property could be an alternative solution too. Have a look to this example, column POP: http://tablefilter.free.fr/datademo.htm and documentation http://tablefilter.free.fr/doc.php#grid_drops. Also an external custom filter could do the same: http://tablefilter.free.fr/external-grid.htm (XRAT and CI filters).

Cheers

Email :


2 . 2010-09-06 04:48:16

remoto wrote:

I've found it! It tooked me after several hours, reading all  the documentation, sample code, comments amd lot of tests, but it worth it! :)

It was related to the on_filters_loaded and mod_filter_fn events, I had the same problem that Lucia faced (2010-08-09 20:55:27) but fortunately it is solved now :)

I wanted to do two things:

1) No records at grid generation time, solved with o.SetFilterValue(0,'_') (col_0 its a numeric column so no record is shown when searching for text :) Later you need to remove it so the grid works ok using o.SetFilterValue(0,''); in the mod_filter_fn event

2) I want the user to search for values lower or equal than the one given, I know the <= operator do that but I can't ask the user to write such a thing as <=2000 because probably most of them would have trouble finding the right keys in the actual keyboard to do it, we use spanish here and there are two keyboard layouts (Latin American and Spain) so many people have a missconfigured keyboard layout. What I did was change filter values in that specific column at runtime.

Right after the user puts 2000 in the inputbox I change it to <=2000, do a o._Filter(); and change it back to normal again :)

THANKS AGAIN MAX, this is the work of a seasoned professional :)

Gustavo Ruiz

Email : remoto AT adinet DOT com DOT uy


Top of page

150 . 2010-09-01 14:31:15

Arpit wrote:

This is an incredible script for filetring, paging and managing column.

But i am facing two issues -

1) It works for less number of rows, but when the number of rows are more say around 10,000 the script does not work at all. it shows all the columns and all the rows after taking a lot of time. Even if we have results_per_page already set.

2) In some cases when data is properly rendered in table for around 700 rows, and i tried to filter the rows having numeric data using filter text box it shows a message -

"Stop running this script?
  A script on this page is causing internet explorer to run slowly
  If it continues to run your computer might become unresponsive."

After this the page just hang.

Let me know if there is any resolution for the above issues.

Email :


3 Replies

1 . 2010-09-02 09:03:03

Max wrote:

I insist, have you enbled the fill_slc_on_demand?

Email :


2 . 2010-09-02 06:38:15

Arpit wrote:

Max, I have already seen your replies to Laura and Gary, but even those not seems to solve my issue.

Do you have any different suggestion which might help?

Email :


3 . 2010-09-01 21:23:12

Max wrote:

Arpit, please refer to my replies to the following comments discussing about the same issue in the Archives:

  • 10 . 2009-11-02 16:00:13 Laura wrote:
  • 63 . 2009-07-15 21:50:32 Gary wrote:

 

Email :


Top of page

151 . 2010-08-30 03:03:42

Peter Weller wrote:

Absolutely fantastic script! I'm trying to integrate it on my homepage.

It' nice that the filter is stored in a cookie so they will be kept if I leave the page and return. But the column visibility isn't stored in a cookie, so everytime I return to the page, column visibility is at inital value.

What about adding the column visibility to the cookie?

Thanks, Peter.

Email : petw1974 AT humaility DOT com


1 Reply

1 . 2010-09-01 21:45:36

Max wrote:

Thanks Peter.
This feature is not available at the moment. It can be implemented by using the on_after_col_is_hidden event, fired just after a column is hidden, and the tf_WriteCookie utility function to write a cookie storing the hidden columns indexes. Then the on_filters_loaded event could be used to apply the hidden columns just after the filters are generated. In short, this feature could be implemented by using the current script API Smile.

Email :


Top of page

152 . 2010-08-24 19:41:00

Alex wrote:

The current "checklist" filtering option you have now is fairly nice, however it doesn't look very good on some forms. Is there a way that we can change it to a drop down checklist? That would overall improve the look/design and use in my opinion. Thanks for your assistance and great work on this!

Email : alexvance DOT plano AT gmail DOT com


2 Replies

1 . 2012-06-08 04:24:44

STEF wrote:

Post your comment here...

Email :


2 . 2010-09-01 09:04:08

Max wrote:

Alex, you could implement such a control by enbling the external filters (...external_flt_grid = true...) and creating your exendend check-list by adding a text-box above it and the drop-down behaviour...

Email :


Top of page

153 . 2010-08-06 18:30:12

Grid loaded with filter value initialized? wrote:

I have been using your filter grid with much success and am trying to do something now that I do not see documentation for. I have a grid of accounts, and one field is an active field which is Y or N. I use a custom dropdown filter for the field and call them [Show All]/Enabled/Disabled. I would like to have the grid loaded with only the Enabled records, but if the user selects Show All or Disabled it will then show what they choose, but when the grid loads, I want it to be initiallized to only show the Enabled Accounts. Below is my code...what do I need to add to do this? Thanks

 

 

var tConfig={   
                        col_0:"select",           
                         
                        <?php if($ne_only == 'Y') echo 'col_2: "none",';
                              else echo 'col_2:"select",'; ?>
                        display_all_text: " [ Show all ] "  ,                                                             
                           paging:true,
                        paging_length:25,
                        alternate_rows:true ,
                        results_per_page:['Results per page',[25,50,100]],
                       
                        loader: true,                         
                        status_bar: true,                       
                        rows_counter: true,
                        rows_counter_text: "Displayed rows: ",
                        btn_reset: true,
                        btn_reset_text: "Clear Filters",
                     
                        fill_slc_on_demand:true,
                        <?php
                            if ($newsege_only == 'Y') echo "custom_slc_options:{
                            cols:[0],
                            texts:[ ['Enabled','Disabled']],
                            values:[ ['Y','!Y']],
                            sorts:[false]
                        }    ,";
                            else echo "custom_slc_options:{
                            cols:[0,2],
                            texts:[ ['Enabled','Disabled'],['RTCR','Ne.com','NC','v8','other']],
                            values:[ ['Y','!Y'],['RTCR','NE.com','NC','v8','!RTCR && !NE.com && !NC&& !v8']],
                            sorts:[false]
                        }    ,";
                        ?>                       
                         
                       
                        sort: true,
                        sort_config: {
                        sort_types:['String','String','String','Number','Number','Number','mdydate','mdydate','mdydate']
                        }     ,
                     
                        msg_sort: 'Sorting...'
                                 
                         
                       
                    }
                 
                  setFilterGrid("account",tConfig);

Email : lgrella AT acquiremedia DOT com


6 Replies

1 . 2010-08-09 20:55:27

Laura wrote:

Max,

 

I do not get any javascript errors, and I created a small html file and i can reproduce the problem. I sent you the hmtl outside of this comment blog (in the contact link), and it appears it read the html, and did not send the message correctly to you. I did not want to take up much space here with the whole html, but I guess I will have to. I will try to only post as much as possible. If you need more of it, please ask. Using this html, I am able to reproduce my problem of not loading the grid with initlaized filters.

 

Thank you,

Laura

 

Here it is:

<head>
   
 
     <script type="text/javascript" charset="utf-8" src="/assets/js/tablefilter.js"></script>
    <script type="text/javascript" src="/assets/js/sortabletable.js" language="javascript" ></script>
    <script type="text/javascript" src="/assets/js/tfAdapter.sortabletable.js" language="javascript" ></script>
    
    
    <link rel="stylesheet" href="/assets/filtergrid.css" type="text/css">
    
 
     <style>
                 /* fake checkbox : unchecked (default/base) state */
        .fakecheck {
            font: 12px Tahoma, Arial, Helvetica, sans-serif;
            text-decoration: none;
            outline: none;
            background: url(/assets/img/enable-disable.png) no-repeat;
            height: 19px;
            width: 40px;
            display: block;
            float: left;
            padding: 1px 0px 0px 20px;
            color: #666666;
        }
        
        /* fake checkbox : checked state */
        .fakechecked {
            background-position: left -40px;
        }
        input.realcheck {
            display: none;
        }
        
        
        /* fake checkbox : unchecked (default/base) state */
        .enabledisablegroup {
            font: 12px Tahoma, Arial, Helvetica, sans-serif;
            text-decoration: none;
            outline: none;
            background: url(/assets/img/enable-disable.png) no-repeat;
            height: 19px;
            width: 40px;
            display: block;
            float: left;
            padding: 1px 0px 0px 20px;
            color: #666666;
        }
        /* fake checkbox : hover state */
        .enabledisablegroup:hover {
            color:#0066FF;
            text-decoration: none;
        }
        /* fake checkbox : checked state */
        .groupchecked {
            background-position: left -40px;
        }
        input.realcheck {
            display: none;
        }
     </style>
</head>
<body>
    
  <div style="background-color:white;" >  
    
         
            <h3>Existing Accounts</h3>
 
             
            <table border="0" cellpadding="4" cellspacing='0' width="100%" class='tablesorter' id='account'>
                
                <thead>
                
                    <tr>
                        <th  >                                Enabled</th>                             
                        <th style='text-align: center;'   > Account Name</th>
                        <th style='text-align: center;'    > Product</th>
                        <th style='text-align: center;'    > Max <br/> Users</th>
                        <th style='text-align: center;'    > Enabled <br/> Users</th>
                        <th style='text-align: center;'    > Max <br/>Sessions</th>
                        
                    </tr>

                </thead>
                <tbody>
                        <tr class='datarow' id='trdelete'>
                             <td><a href='#Account1' class='enabledisablegroup groupchecked'     id='g1' rel=' Account 1 '>&nbsp;</a><input type='checkbox' name='account[1]' id='1' class='realcheck' value='1'  checked /><div style='display:none;' > Y </div></td>
                              <td>Account1</td>
                             <td    style='text-align: right'>rtcr</td>
                              <td   style='text-align: right'>10</td>
                             <td   style='text-align: right'>2</td>    
                             <td    style='text-align: right'>5</td>

                          

                         </tr>
                         <tr class='datarow' id='trdelete'>
                             <td><a href='#Account2'  class='enabledisablegroup  '      id='g2' rel=' Account 2 '>&nbsp;</a><input type='checkbox' name='account[2]' id='2' class='realcheck' value='1'  checked='unchecked' /><div style='display:none;' > N </div></td>
                              <td>Account2</td>
                             <td    style='text-align: right'>newscast</td>
                              <td   style='text-align: right'>10</td>
                             <td   style='text-align: right'>2</td>    
                             <td    style='text-align: right'>5</td>
 

                         </tr>
                         <tr class='datarow' id='trdelete'>
                             <td><a href='#Account3' class='enabledisablegroup groupchecked'     id='g3' rel=' Account 3 '>&nbsp;</a><input type='checkbox' name='account[3]' id='3' class='realcheck' value='1'  checked /><div style='display:none;' > Y </div></td>
                              <td>Account3</td>
                             <td    style='text-align: right'>newsedge</td>
                              <td   style='text-align: right'>10</td>
                             <td   style='text-align: right'>2</td>    
                             <td    style='text-align: right'>5</td>
   
                         </tr>
                         <tr class='datarow' id='trdelete'>
                             <td><a href='#Account4' class='enabledisablegroup' id='g4' rel=' Account 4 '>&nbsp;</a><input type='checkbox' name='account[4]' id='4' class='realcheck' value='1'  checked /><div style='display:none;' > N </div></td>
                              <td>Account1</td>
                             <td    style='text-align: right'>rtcr</td>
                              <td   style='text-align: right'>10</td>
                             <td   style='text-align: right'>2</td>    
                             <td    style='text-align: right'>5</td>

                            
                         </tr>

                </tbody>
            </table>
        
          <script language="javascript" type="text/javascript">
                
                var tConfig={    
                        col_0:"select",            
                        
                         col_2:"select" ,
                        display_all_text: " [ Show all ] "  ,                                                              
                           paging:true,
                        paging_length:25,
                        alternate_rows:true ,
                        results_per_page:['Results per page',[25,50,100]],
                        
                        loader: true,                        
                        status_bar: true,                        
                        rows_counter: true,
                        rows_counter_text: "Displayed rows: ",
                        btn_reset: true,
                        btn_reset_text: "Clear Filters",
                     
                         custom_slc_options:{
                                    cols:[0],
                                    texts:[ ['Enabled','Disabled']],
                                    values:[ ['Y','!Y']],
                                    sorts:[false]}    ,
                        
                         sort: true,
                        sort_config: {
                        sort_types:['none','String','String','Number','Number','Number' ]
                        }     ,
                    
                        msg_sort: 'Sorting...' ,
                       
                        on_filters_loaded: function(o){   
                           o.SetFilterValue(0,'Y');    
                           o.SetFilterValue(2,'newsedge');
                           o.Filter();  
                             }            
                        
                        
                    }
                  
                    setFilterGrid("account",tConfig);
                 
            </script>

 

 

Email : lgrella AT acquiremedia DOT com


2 . 2010-08-09 17:38:25

Max wrote:

Do you have any javascript error on your page? If yes, check if it comes from this script.
In case, send me a html page - no server-side page (php, cfm, asp etc) I cant execute them - reproducing the problem.

Email :


3 . 2010-08-09 15:50:34

Laura wrote:

Max, thanks you for the quick reply. I now understand why the dropdowns are not active upon load. I still do not get the dropdowns initialized on load after trying what you suggest. I can have other text box columns initilized but the dropdowns do not.

This is my code:

 on_filters_loaded: function(o){  
                           o.SetFilterValue(0,'Y');   
                           o.SetFilterValue(1,'test');
                           o.SetFilterValue(2,'rtcr');   
                           o.Filter(); 
                             } 

 

columns 0 and 2 are dropdowns and the grid loads with select all. Column 1 does load with only values that have the text "test' in it.

Is there maybe something wrong with the function with dropdowns?

Email :


4 . 2010-08-08 09:56:45

Max wrote:

Hi Laura,
I suggest to use in your configuration object the on_filters_loaded event that is fired just after the filters are generated. Please have a look to the doc: http://tablefilter.free.fr/doc.php#grid_behave and to these demo pages to have an idea: http://tablefilter.free.fr/data-types.htm and http://tablefilter.free.fr/custom-data.htm

Concerning the drop-down filter, it is not activated at page load because you have the fill_slc_on_demand property set to true, this means that drop-downs are filled only the first time users click on it. It is useful with very large tables as the drop-downs generation is quite a time-consuming operation for some browsers.
I hope this will help you somehow.

Email :


5 . 2010-08-06 23:22:06

Laura wrote:

Just to add....i forgot to also put in the last post that I also have tf_account.Filter(), and when i try to initalize filtering for other rows, (this text box filtering) it works, but for the dropdown filter it does not. Also, when the page loads, the dropdown filter is not active, and if you hover over it, it says "click to activate".

 

Thanks (and sorry for the multiple posts)

Email :


6 . 2010-08-06 23:07:10

Laura wrote:

OK...I figured out that I have to put

 

tf_account.SetFilterValue(0,'Y');   

 

after the setFilterGrid, but it does not load with only  records = 'Y', It loads all records anyway. Why would this be?

Email :


Top of page

154 . 2010-08-02 17:11:57

Problem with date sorting wrote:

I have a table with 3 date columns. The dates do not seem to be sorting correctly. Their format is mm-dd-YYYY.

I specify the col_date_type as

        sort_config: {
                         sort_types:['String','String','String','Number','Number','Number','Date','Date','Date']
                        }     ,

and the col_date_type as:

      col_date_type: [null,null,null,null,null,null,'mdy','mdy','mdy'],   

It does not sort dates correctly.

 

 

If it helps, here is my whole script for the filtergrid with sort:

 <script language="javascript" type="text/javascript">
                 
                var tConfig={   
                        col_0:"select",           
                         
                        <?php if($ne_only == 'Y') echo 'col_2: "none",';
                              else echo 'col_2:"select",'; ?>
                        display_all_text: " [ Show all ] "  ,                                                             
                           paging:true,
                        paging_length:25,
                        alternate_rows:true ,
                        results_per_page:['Results per page',[25,50,100]],
                       
                        loader: true,                         
                        status_bar: true,                       
                        rows_counter: true,
                        rows_counter_text: "Displayed rows: ",
                        btn_reset: true,
                        btn_reset_text: "Clear Filters",
                     
                        fill_slc_on_demand:true,
                        <?php
                            if ($ne_only == 'Y') echo "custom_slc_options:{
                            cols:[0],
                            texts:[ ['Enabled','Disabled']],
                            values:[ ['Y','!Y']],
                            sorts:[false]
                        }    ,";
                            else echo "custom_slc_options:{
                            cols:[0,2],
                            texts:[ ['Enabled','Disabled'],['RTCR','Ne.com','NC','v8','other']],
                            values:[ ['Y','!Y'],['RTCR','Ne.com','NC','v8','!RTCR && !Ne.com && !NC&& !v8']],
                            sorts:[false]
                        }    ,";
                        ?>                       
                         
                       
                        sort: true,
                        sort_config: {
                        sort_types:['String','String','String','Number','Number','Number','Date','Date','Date']
                        }     ,
                        col_date_type: [null,null,null,null,null,null,'mdy','mdy','mdy'],
                        msg_sort: 'Sorting...'
                                 
                         
                       
                    }
                 
                  setFilterGrid("account",tConfig);         
            </script>

 

 

Also, the way I construct the date column is a php function converting the date into a string:

ts($row['start_date'],"mm-dd-yyyy")

Email : lgrella AT acquiremedia DOT com


1 Reply

1 . 2010-08-02 17:38:09

Laura wrote:

I figured it out....i had to put

     sort_config: {
                        sort_types:['String','String','String','Number','Number','Number','mdydate','mdydate','mdydate']
                        }

 

mdydate as the sort_type rather than date.

Email :


Top of page

155 . 2010-07-29 20:58:19

Mike wrote:

Once our table has grown larger (around 1300 entires), the page seems to take forever to load and we often get a unresponsive script error.

Any ideas on why this would be happening? I'm assuming that it is because it's loading those 1300 entries, then completing pagination, then trying to sort when asked to and this is a lot of entries for an html table to sort. Even though the table is being built from a database, this script is sorting through the printed html table. Is that a correct assumption?

Email : mgranger AT wrcase DOT com


1 Reply

1 . 2010-07-29 21:58:02

Max wrote:

Mike, if you have many columns with nested elements in each cell my advice is to use the fill_slc_on_demand property that loads the drop-down filters only at first use. Moreover, if you use the latest version of the (v 1.9.8) it is better to use the tablefilter_all.js document which contains all the features in one document, as the modules importing mechanism used in the tablefilter.js seems to be buggy under IE, for the moment. Please also refer to the following comment posted in the Archives that replies to similar issue: 5 . 2009-11-02 16:00:13 Laura

and also have a look to this demo: http://tablefilter.free.fr/load-filters-on-demand.htm (1176 rows).
Finally, make sure there are no other eventual js scripts generating client-side errors.
I hope this information will help you somehow.

Email :


Top of page

156 . 2010-07-15 20:01:44

John wrote:

When paging is enabled, I noticed that the total rows count was being hidden if the value was large.

You can see the issue in the current example here. http://tablefilter.free.fr/datademo2.htm

Notice that the 1176 disappears when you move to the next page.

I got around this by increasing the width in filtergrid.css for div.tot

 

Email : johnphilippeters AT gmail DOT com


1 Reply

1 . 2010-07-22 17:57:00

Max wrote:

Thanks for pointing this out. Do not hesitate to edit the filtergrid.css stylesheet for your project needs, that s the purpose of it!

Email :


Top of page

157 . 2010-07-12 19:36:34

Pedro wrote:

Is there a way to gray out/color rows rather than hide them?

Email :


3 Replies

1 . 2010-07-15 08:56:14

Max wrote:

The script hides/shows rows by setting the display property of a row element, that's all. Basically, you just need to search for .style.display = '' in the code, check that it concerns a row and change it for your needs. The following methods might be concerned: Filter, GroupByPage, SetRowValidation, RemoveGrid, SetColOperation

Email :


2 . 2010-07-14 18:51:14

Pedro wrote:

Some point in the right direction would be great. I looked at the code and there is a point where it uses a ternary operator to set the value of fields to hidden or not. Is that area of code to modify? I guess a better question to ask is how the row hiding is done. Is it setting the property of certain rows to hide/show it or does it form a list and then populates the table with the rows on that list?

Email :


3 . 2010-07-14 08:48:50

Max wrote:

Pedro, there is no way to change it unless you change the code of the script. Let me know if need some hints or need a premium request.

Email :


Top of page

158 . 2010-07-12 17:47:38

John wrote:

I needed a way to Show/Hide all the columns with one click

My changes could be a little cleaner with additional flags to control the display/css.

I added two links next to the Close link

 //SHOW ALL
 var show = tf_CreateElm( 'a', ['href','javascript:;'] );
 show.className = this.btnShowHideColsCloseCssClass;
 show.innerHTML = 'Show All';
 show.onclick = function(){ o.ShowHideAll(true); };
 p.appendChild(show);
 
 //HIDE ALL
 var hide = tf_CreateElm( 'a', ['href','javascript:;'] );
 hide.className = this.btnShowHideColsCloseCssClass;
 hide.innerHTML = 'Hide All';
 hide.onclick = function(){ o.ShowHideAll(false); };
 p.appendChild(hide);

 Then I added the new method ShowHideAll

TF.prototype.ShowHideAll = function(checkAll)

 for(h=0; null!=(itm=tf_Id('col_'+h+'_'+this.id)) ; h++)
 {   
  if(checkAll && !itm.checked)
   itm.click();
  else if(!checkAll && itm.checked)
   itm.click();   
 }
}

 

Email : johnphilippeters AT gmail DOT com


1 Reply

1 . 2010-07-13 08:49:58

Max wrote:

Hi John,

thanks for your contribution, it will be implemented in the next version of this extension. I really appreciate Smile!

Email :


Top of page

159 . 2010-07-07 17:29:00

Adolf wrote:

Hello Max, Is there a way to have certain rows hidden at start?

Email :


2 Replies

1 . 2010-07-08 22:24:02

Adolf wrote:

I'm sorry Max. Seems it does not work. I think I'm doing something wrong but I don't know what...

Email :


2 . 2010-07-07 20:10:12

Max wrote:

You could use the on_filters_loaded event to hide desired rows once filters are generated:

var tfConfig = {
    ...
    on_filters_loaded: function(o){
        o.tbl.rows[4].style.display = 'none';
        ...
    },
    ...
}

Email :


Top of page

160 . 2010-06-30 19:26:24

peace wrote:

How can I get the current row index? Is there any function in the script I can use? what I am trying to do is, when the user is on a specific row on the table and uses down arrow key , the cursor to move to next row down. I dont want to use tab control.

Email : peace950 AT yahoo DOT com DOT sg


4 Replies

1 . 2010-07-04 10:58:49

Max wrote:

Peace, I dont think the backspace event propagation is due to this script. I never heard about this issue before. There might be other client-scripts implementing the backspace event on your page.

Email :


2 . 2010-07-02 20:34:58

peace wrote:

Thanks Max.

I could implement that using your script function "GetValidRowsIndex()" . Thanks for the link. I will certainly check it.

The other issue I have got now is: when the user enters a search term in the filter text box, it works fine but when the user clears the typed string in the filter text box using backspace, the string is cleared but the backspace key propogates and takes the user to previous page. I am trying to resolve it but if you have any workaround for this issue please let me know.

Thanks

Email : peace9 AT yahoo DOT com DOT sg


3 . 2010-07-02 13:51:03

Max wrote:

Peace, the script does not provide such a function. The rowIndex property of a row object gives you the row index in javascript: http://www.w3schools.com/jsref/prop_tablerow_rowindex.asp

Email :


4 . 2010-06-30 19:27:57

peace wrote:

I have checked the documentation and could not find any function.

Email : peace950 AT yahoo DOT com DOT sg


Top of page

161 . 2010-06-28 21:59:19

peace wrote:

Hi Max, This is a wonderful script. Thank you. I have used this script to filter a table with checkboxes in  one of its columns. What I am trying to do: the user clicks on "Select All" button  and all the checkboxes of the filtered rows are checked at once. This is done., but the issue here is, when the user filters the table data and clicks on "Select all" button all the initial table rows are selected  instead of only the second time filtered rows getting selected. I have tried using the GetFilterElement,GetFilteredData()  and GetFilteredDataCol().I have not got the reults.


I want to get the DOM element, the checkbox and make all the filetered rows checked. Can you plese tell me the best way to do it with your tablefilter script.

Email : peace950 AT yahoo DOT com DOT sg


1 Reply

1 . 2010-07-02 20:36:45

peace wrote:

Solved this. Thanks.

Email : peace950 AT yahoo DOT com DOT sg


Top of page

162 . 2010-06-23 12:04:40

EC wrote:

Thanks, this script is really amazing. i have 1 question, my table`s contents are load from external text file, there are 3 different ways to generate the filter grid bar:

  • invoke the setFilterGrid function:
  • add a filterable class to desired table (unobtrusive method): <table id="table1" cellspacing="0" class="mytable filterable" >  
  • instantiate a TF object
    but it only works for second 1 (add a filterable class to desired table ).
    i`m very new to this, any help will be greatly appreciated, thx.

Email : ec DOT cheah AT hotmail DOT com


0 Reply

Top of page

163 . 2010-06-19 20:30:58

farid silva wrote:

I just discover this script via google and I think is really amazing!

I read the examples and the documentation but I got no look to find if there is a way to move the navigation bar to the bottom of the table.

Email : faridsilva AT gmail DOT com


1 Reply

1 . 2010-06-22 20:24:50

Max wrote:

Hi Farid, actually if you set the grid_layout option to true you will have the navigation bar at the bottom, otherwise you will need to hide the navigation bar and and generate the navigation buttons externally which is possible with the script. Have a look to following demos to get some inspiration:
http://tablefilter.free.fr/grid-layout.htm
http://tablefilter.free.fr/external-grid.htm

Email :


Top of page

164 . 2010-06-17 08:30:05

Ilya wrote:

Dear Max,

 

The ColResizer extension does not seem to work for tables wider than the screen.  Here is a stripped-down example:

http://www.broadinstitute.org/~ilya/z.html

For tables initially less wide than the screen, resizing works only until the table becomes as wide as the screen, and then stops.

Is there a workaround?

Thanks,

Ilya

Email : ilyawebmail AT gmail DOT com


1 Reply

1 . 2010-06-22 20:17:41

Max wrote:

Hi Ilya, I am on vacation at the moment really far from my PC... I will have a look and try to find a workaround but I dont know when exactly... In the meantime you coud try to enable the grid_layout property, this could solve your issue. Have a look to this demo page:
http://tablefilter.free.fr/grid-layout.htm

Email :


Top of page

165 . 2010-06-10 20:26:59

Michael wrote:

Dear Max,

I don't have any problems with your wonderful script, thank you so much! But ... Wink  I have a small question about custom_cell_data event: I have in the last col an "export" checkbox  and want to check/uncheck them all at once, when the table is filtered in some way... I have the following js:

       function toggleCheckboxes(form_export)   {
         var form=$(form_export);
         var i=form.getElements('s_id[]');
           i.each(function(item){
               if (item.checked){
                   item.checked=false;
               }
               else {
                   item.checked=true;
               }
           });
       }

 

The problem is: all the data is exported, not only the filtered data. My question is: is there a way to do it with your script and a button with the custom_cell_data event?

Email :


2 Replies

1 . 2010-06-16 21:00:57

Michael wrote:

Thank you Max, for your comment. Would it not be better to use GetFilteredDataCol(), because I only need to get those checkboxes with the same name ('s_id[]') from the last col(15) of the filtered table(my_table1) in the form(my_exportform). But I don't know how to set the value 'checked' to all the filtered rows aka. checkboxes at once... I have really bad knowledge in JS and I didn't find a function to set values in HTML Table Filter Generator script. This might be a new feature ;-) But I am also very satisfied with your script, it saves me a lot of work, thank you for your efforts!

 

Email :


2 . 2010-06-13 17:14:14

Max wrote:

Michael,
the script has a public method called GetFilteredData() (myTF.GetFilteredData()) that returns only filtered lines. Please have a look to this doc page http://tablefilter.free.fr/doc_methods.php to see how returned array is formatted. You could use on the onclick event of your button this method to export data.

Email :


Top of page

166 . 2010-06-10 05:25:44

Me wrote:

Hi, your table filter is wonderful!! I just have one problem, when the page loads the table doesnt display the content. When i click on 'clear filter' then it loads the table. I dont know why its doing that. any help would be appreciated.

Thanks

 

Email :


7 Replies

1 . 2010-07-16 13:40:48

PaulD wrote:

Hi, I am having similar problems with the watermark.  When I first go to the page, then type a search term over the watermark and press enter it returns an empty table.  If I press 'Clear' and enter the same term again it is fine.  I have tried it with 'remember_grid_values' set to True or False and it has no effect.

Is  there any way to force an implicit clear on page open (without using remember_grid_values)?  I believe this would get round the problem.

BTW your Table Filter script is excellent.  It has allowed me to add features our users had previously only dreamed of.

Cheers,

Paul

Email : paul DOT drake AT tui-uk DOT co DOT uk


2 . 2010-06-22 13:18:27

Max wrote:

Marek, try to empty your temp internet files, this should resolve your problem. By the way, the watermark works with the remember_grid_values option on.

Email :


3 . 2010-06-17 12:53:44

Marek wrote:

I seem to run into another problem with "watermark" feature.

Table works correctly when "input_watermark" is not set.

When I change it to any text, the table loads initially, but any filtering returns empty list. Only after "Clear all" situation becomes normal.

I do have "remember_grid_values: false" setting in properties for that table

Email :


4 . 2010-06-17 06:09:23

me wrote:

oops sorry.. i was looking at a wrong place.. yes i had that value to true.. now i have it to false and it clears the filter on page reload!!.. thank u :) .. and the watermark works now.. when this value is set to false :).. thank you thank you thank you

Email :


5 . 2010-06-17 03:52:33

me wrote:

Hi, I have that remember_grid_values set to false .. its still not clearing the filter on reload :(

Email :


6 . 2010-06-11 13:48:02

Max wrote:

I think you simply have the remember_grid_values option set to true in your configuration object, this enables filters' value persistence when page is re-loaded. In any case the watermark feature works also when this property is enabled. Have a look to these demos to see both options in action:
http://tablefilter.free.fr/custom-theme.htm
http://tablefilter.free.fr/theme.htm

Email :


7 . 2010-06-11 02:09:54

me wrote:

Hi, I figured it out.. its the watermark.. when i put in wording for the water mark.. it seems to do that. It doesnt seem to like watermark words. it filters on that word as soon as the page loads.

Also, i have one other question. When the user refreshes the browser, why doesnt the filter clear? it still caches the last filter operation. Any way i could change that ?

your help is much appreciated. :)

 

Email :


Top of page

167 . 2010-06-04 05:39:46

G wrote:

"Hi, I am not sure if you have this function. But I would like to have an automatic list show up on an input field as the user types. ( similar to what google search box does). is this possible? btw. your script is great!.. and it works wonders.. saved me a lot of coding time!! :) thanks G"

Email :


1 Reply

1 . 2010-06-04 23:40:02

Max wrote:

Thanks G, there is no autocomplete feature available. There is an automatic filtering when user stops typing (on_keyup).

Email :


Top of page

168 . 2010-06-03 09:00:44

Lampo wrote:

IE8 does not work with the reorganization of the dates in EU format, great script

Email :


1 Reply

1 . 2010-06-04 23:14:50

Max wrote:

Be more precise...

Email :


Top of page

169 . 2010-06-03 01:34:00

Juan wrote:

Great script, I decided to use it in my web app, the url is www.glegal-mexico.com.

I am using the script for filtering tables generated from a query to a MySQL database, the result of the query is showed using your script, my problem is that I am implementing a function to export the results of the filtered table to MS Excel so  I ca use that info to generate some graphics. I am using the GetFilteredData() function a it works great, but I can not get the headers of the columns, also I am using the ColsVisibility extension is there a function I can use to know how many columns are displayed and their headers?

I apreciate allot your comments and sorry for my english.

Email : jgomez AT glegal-mexico DOT com


1 Reply

1 . 2010-06-04 23:13:55

Max wrote:

Thanks Juan. Here you have a piece of code showing how to retrieve column headers:

    var columnsHeaders = [];
    for(var i=0; i<myTF.tbl.rows[myTF.GetHeadersRowIndex()].cells.length; i++){
        var cHeadCol = myTF.tbl.rows[myTF.GetHeadersRowIndex()].cells[i];
        columnsHeaders.push(tf_GetNodeText(cHeadCol));
    }

myTF is your TF object.

Concerning the ColsVisibility extension, what you could do is define a on_after_col_is_hidden event in your config object and store the indexes of the hidden columns in a global variable and use the on_after_col_is_displayed to remove the hidden index from your global var whenever a column is displayed.

Email :


Top of page

170 . 2010-06-01 19:12:28

Laura wrote:

I've been using the script for months and find it very simple and useful. My problem is I was only testing it on FF and IE, and not in safari. In safari, the table is not lining up correctly. The info area above the table is in the right place, but the table header and body are moved over to the right about 60%,This happens on different pages where I am using the tablefilter and I am at a loss why. I appreciate any help. Thanks

My table is defined as:

<table  id='customer'>
               
                <thead>
               
                    <tr>
                                              
                        <th style='text-align: center;'   > Customer name</th>                     
                        <th style='text-align: center;'   > Start Date</th>
                        <th style='text-align: center;'   > Expires</th>
                        <th style='text-align: center;'    > Last Changed</th>
                    </tr>

                </thead>
                <tbody>
                    <?php echo $tablerows; ?>
                </tbody>
            </table>

and the script code is:

 <script language="javascript" type="text/javascript">
                 
                var tConfig={   
                         
                        display_all_text: " [ Show all ] "  ,                                                             
                           paging:true,
                        paging_length:25,
                        alternate_rows:true ,
                        results_per_page:['Results per page',[25,50,100]],
                       
                        loader: true,                         
                        status_bar: true,                       
                        rows_counter: true,
                        rows_counter_text: "Displayed rows: ",
                        btn_reset: true,
                        btn_reset_text: "Clear Filters",
                        default_date_type: "mdy",
                        col_date_type: [null,'mdy','mdy','mdy'],
                       
                        fill_slc_on_demand:true,
                                                   
                         
                        sort: true,
                        sort_config: {
                        sort_types:['String','Date','Date','Date']
                        }     ,
                        msg_sort: 'Sorting...'
                                 
                         
                       
                    }
                //]]>
                  setFilterGrid("customer",tConfig);         
            </script>

 

Email : lgrella AT gmail DOT com


1 Reply

1 . 2010-06-04 21:52:11

Max wrote:

Laura,
from what understand there might be an element in the info top bar (rows counter, pagination navigation elements, etc.) that is bigger than the top bar itself and pushes the table on the right... Have a look to the filtergrid.css stylesheet and play with the info bar classes to determine which is the element pushing the table on the right.

Email :


Top of page

171 . 2010-05-21 10:35:13

Reems wrote:

Great script! I would like to implement the script in the application I am building.
But one possibly interesting extra feature beside the fixed header would be a fixed left column.
Is it something you have plans to implement??

 

Thanks,
Reems

Email : reems AT xs4all DOT nl


3 Replies

1 . 2010-05-28 13:33:54

Max wrote:

Reems, I think I've already seen this before...
It happened to me with IE when stylesheets are imported programmatically by the TF script. If you load the stylesheet(s) in the head section of your page (<link src="..."...) this behaviour is fixed.
I hope this will help you

Email :


2 . 2010-05-26 12:57:10

Reems wrote:

Great,

I have implemented now your script in my application as a test and I came up with the following problem:

I load a html table with data (generated with php) with ajax.
The gridlayout with fixed headers with all functionality works fine in FF.
But in IE the width of the columns in the header is changed so, that it fits precisely in the table, while the columns in the datarows have the right width.

Effect is that the data scrolls horizontaly as it should be, while the header doesn't move.

Do you kwow a way how to correct this??

Thanks in advance,

Reems

Email : reems AT xs4all DOT nl


3 . 2010-05-24 11:08:34

Max wrote:

Hi Reems, for the moment I don't have plans for developing fixed columns. This could be a nice extension...

Email :


Top of page

172 . 2010-05-09 16:31:33

Fahim wrote:

Hi Max / All,

I have been using the script for a while and came across the following strange behaviour when using sorting and pagination features.

On initial table load, pagination works no problem, going right and left. However, once you sort on a column and then go back to pagination, it doesn't work properly after paginating to a few pages.

Any ideas?

Also, how do you use the "on_after_sort" function? Do you have an example of it ? I tried the following but didn't work:

...
on_after_sort: function(o, 1,),
...

 

Thanks for your help.

Email : fahimsalim AT hotmail DOT com


1 Reply

1 . 2010-05-10 22:50:43

Max wrote:

Fahim have a look to the sort demo page, and generate pagination by clicking on the Add paging button. You will see the pagination in action combined with sorting. Do you the use WebFx Sortable Table 1.12 script (Erik Arvidsson) for the columns sorting in your project? If it is not the case, your strange behavior is quite normal... I had to implement an adapter script to make both features work together. I guess this needs to be done for any other sorting script used with the TF paging.

Concerning the on_after_sort event, below an example in a config object:
...
on_after_sort: function(o, colIndex){ alert( o.id + ' column index '+ colIndex); },
...
Replace the alert with your logic. The o callback parameter is the TF object itself. Refer to the documention also:
http://tablefilter.free.fr/doc.php#grid_sort

Email :


Top of page

173 . 2010-05-01 00:26:35

Carl wrote:

Hi Max/All.

Thanks for providing simply the best table script ever.

I have decided to stop using my current table scripts and use yours on my website. I am having too many problems with the old one.

I have almost got yours working how I need except one remaining problem. I need it to search full text in one column. The text in that particular column is a tooltip popup and it refuses to search the whole text in that column. It will only find the one word I have on the link which you hover on to bring the tooltip up.
I already have databases on the website and it does search the whole text but I have no idea which part of the javascript code makes full text tooltip searching work. I am changing from the old databases to this new one and would be grateful of any help you could give.
I have uploaded the new database using your script so you can see the problem at;
http://missing-and-unidentified.org/test/cayt.html
the problem column that I need tooltip search on is the one called "Identifying"
the html/css and javascript are uploaded in one zip file in case you need it at;
http://missing-and-unidentified.org/database.zip
the old databases which give me the full search are on the website. A sample URL is;
http://missing-and-unidentified.org/missing_male_children_database.php
You will see on the old databases that the whole text on the tooltip is searched. This is what I desperately want then I can switch to yours.

Thanks...
Carl

Email : carl AT missing-and-unidentified DOT org


5 Replies

1 . 2010-05-09 14:20:56

Max wrote:

Thanks Carl, I have added your link to the references list!

Email :


2 . 2010-05-05 00:52:53

Carl wrote:

You are welcome Max.

Just thought that you would like to know that the website databases have now switched to your table script :)

Email : carl AT missing-and-unidentified DOT org


3 . 2010-05-03 09:16:53

Max wrote:

Thanks Carl, I really appreciate Smile!

Email :


4 . 2010-05-02 21:56:07

Carl wrote:

Thanks Max!

You Got Funds! :)

Email : carl AT missing-and-unidentified DOT org


5 . 2010-05-02 21:30:03

Max wrote:

Hi Carl,
I sent a working example showing how to search in tooltips by email.

Email :


Top of page

174 . 2010-04-30 15:13:14

Cheesedude wrote:

First off, I want to say your filter script is excellent.  It works like a dream so far as I have tested it for possible use on a website.  However, I do have a few constructive criticisms. 

Your script is getting a little bloated.  It's a bit much for each visitor to download a 184kb javascript file (version 1.9.7) when the largest page size I have to use it with is only 100kb.  Not everyone here in America has high speed internet and not every mobile internet browser is fast.  (I get a lot of users on cell phones.)  The estimated time to download a file of that size for a dial-up user is 26 seconds.  I know that there are methods to include other javascript files in when needed.  Perhaps that would be an option for lesser used features or perhaps features could be split up into separate files and included as the webmaster needs.

As of now I have only looked at version 1.6.  I took a peek at 1.7.  I was not thrilled to see styling in the javascript file actb.js.  It looks like that was removed in version 1.7.  I'll test that version out. 

More commenting within the code would be nice, too.

Thank you very much for your work. :)

Email : cheesedude2006 AT yahoo DOT com


1 Reply

1 . 2010-05-01 18:37:31

Max wrote:

Hi, first of all, I appreciate your constructive criticisms. Please note you have a compressed file of 110 Kb available in the download zip file although I know this is still too heavy for slow connections and hand-held devices. To split the script in different scripts based on functions is a good idea but it implies to include a lot of files if you use many of the available features and, in the end, to make the loading process even longer, as it is faster for a browser to download a unique big js than a variety of smaller files... It would be interesting for developers to choose... I am not sure I will have time to provide a splitted version of the script in the next releases... As this needs a general re-thinking of the script, it will depend on my spare time!
Concerning the actb.js, please note this is a script of another guy, and I removed it long time ago. It was an example showing how to combine my script with that one. Finally, commenting could be worse...

Email :


Top of page

175 . 2010-04-12 02:22:33

Javft wrote:

Hi Max! thanks for nice script! im working with customs pager buttons using the tf_demo.SetPage function... and i have

onpreviousbutton.gif offpreviousbutton.gif / onnextbutton.gif offnextbutton.gif....

the problem is that to set the off buttons images I need to get the currentpage number.... eg. if currentpage == 1 previous button would be set to off image.. & next set to on... 

is there a function I can call to get the current page?

thanks in advance!!

Email : javftr AT yahoo DOT com


3 Replies

1 . 2010-04-19 13:30:25

Max wrote:

It seems you sorted it out!

Email :


2 . 2010-04-12 03:41:47

javftr wrote:

Sorry I forgot something else!

if I were in the last page,, I should use another function to change next button image to off...

how to get this?

thanks!

Email : javftr AT yahoo DOT com


3 . 2010-04-12 02:52:23

Javftr wrote:

well,, I got it !! thanks anyway max!

<input type="button" value="getCurPage!" onclick="alert(tf_demo.currentPageNb)">

Email : javftr AT yahoo DOT com


Top of page

176 . 2010-04-05 20:40:37

J Dobule P wrote:

I needed a way to reference the Cell where the filter is stored so that I could hide the entire column.

So I added a new parameter for an array of ids

 this.cellFltIds = f!=undefined && f.cell_flt_ids!=undefined //array containing ids for the Cell Filters
        ? f.cell_flt_ids : null;

Then I modified the creation of the fltcell

var fltcell;
if(this.cellFltIds)
     fltcell = tf_CreateElm(this.fltCellTag,['id',this.cellFltIds[i]]);
else
     fltcell = tf_CreateElm(this.fltCellTag);

 

 

Email : johnphilippeters AT gmail DOT com


1 Reply

1 . 2010-04-19 13:27:59

Max wrote:

Thanks for your code!
You could also get the cell reference in the following way without adding any code to the script:

var cells = myTf.rows[myTF.GetFiltersRowIndex()].cells; //array with cells
var cell = cells[0];

Email :


Top of page

177 . 2010-03-18 12:56:59

piepiax wrote:

Hi Max,

 

Is it possible to filter table with 'is checked' ?

Indeed, I have a cell with a check box for all lines and I would like to have the possibility to show:

   - All lines (Checked and Unchecked)

   - Only Checked lines

   - Only Unchecked lines

It could be like a 'select' filter with this values ?

 

Do you plan to add this feature ? If not, do you have hints to do this kind myself ?

Thanks

Email : piepiax AT free DOT fr


2 Replies

1 . 2010-03-19 10:38:33

piepiax wrote:

Hi Max,

 

Thanks (and sorry), I don't see it Tongue out

I implement this function but (as I understand) that populates the select with the actual values of the column.

And in the begining, All the cells are checked, so only "checked" choice is available !

custom_cell_data_cols: [1],
custom_cell_data: function(o,c,i){
 if(i==1){
  var chk = c.getElementsByTagName('input')[0];
  if(chk.checked) return 'Checked';
  else return 'UnCkecked';
 }
}

May be it possible to implement fix values with this function but I don't know how to do this ?

I check another function that could answer "custom_slc_options" but Idon't known (again) how set values with cell.checked == 'true' and cell.checked == 'false' ?

custom_slc_options: {
                        cols:[1],
                        texts: [
                                ['Checked','UnChecked']
                                        ],
                        values: [
                                ['true','false']
                                        ],
                        sorts: [false]
                }

 

Thanks for your Help.

Email :


2 . 2010-03-19 09:25:26

Max wrote:

Piepax,

please note you can already implement that. Please have a look to this example:

http://tablefilter.free.fr/custom-data.htm

and also check the custom_cell_data_cols and custom_cell_data configuration options:

http://tablefilter.free.fr/doc.php#grid_behave

 

Email :


Top of page

178 . 2010-03-03 15:39:34

Michelle wrote:

The script works great, however the table is pulling data from a database. Once the table is emptied out the filter goes away.  And when data is added back in to the table the filter still will not come back.

javascript error message 'nodeType is null or not an object'

I tried removing the javascript and then adding it back in but it still doesn't work...Any help??

Email : jeannettepalmieri AT yahoo DOT com


0 Reply

Top of page

179 . 2010-02-24 11:52:52

Sam wrote:

Hi Max,

 

In my corporate a web having data in the 4th table need to be set up with this filter.

Is it possible to initilize this by using a bookmarklet.

 

I was able to include the JS and CSS to the page, but it is throwing "TF is not defined" error or "Object required" error when I use setFilterGrid( "Table1",Table1_Props); where Table1 is the ID of the table and Table1_Props is the Properties variable.

 

Regards,

Sam

Email : ezrasam AT gmail DOT com


14 Replies

1 . 2010-03-15 14:11:39

Sam wrote:

Max,

 

Its all the same, but i just added my observations in the previous post.

Kindly check it, you may be able to guide me then.

 

Regards

Sam

Email :


2 . 2010-03-14 08:09:18

Max wrote:

Hi Sam,

I just got back from vacation. Could you tell me what is the problem again?

Email :


3 . 2010-03-01 16:24:01

Sam wrote:

Max,

 

i found the following interesting.

When i had paging: true, the table was paged and the paging feature was working all good.

However, when i clicked on the filter the paging was lost and all the lines were displayed. but Filter method invocation left everything unchanged.

 

GetColValues(0,false) Did not return anyvalues, however S2S.GetTableData() & GetLastRowIndex() is functioning properly.

 

Also, one important thing that i forgot to mention is the ID for the table was set at the user end, (as there was no ID set) just before invoking the setFilterGrid method.

Could this cause some problem?

 

Also, there is no <TH> / <THEAD> / <TBODY> in the table. Could they be a cause?

 

I hope this would be interesting to you too.

 

Regards

Sam

Email :


4 . 2010-02-26 17:13:57

Sam wrote:

Max,

My last reply was an accident.Laughing

I got the following in Firefox, however I use IE6, & this effort will be used only in IE6 by my colleagues.
Warning: Unknown property 'text-overflow'.  Declaration dropped.
Source File: http://My source/filtergrid.css
Line: 186


Also, IE6 didn’t show me any errors.
Can you try at your end to initialize the script from user end, just like I did using a BookMarklet on some random table?

Following links would help you build the BookMarklet quickly.
http://subsimple.com/bookmarklets/jsbuilder.htm
http://betterexplained.com/articles/how-to-make-a-bookmarklet-for-your-web-application/

Thanks for working with me this whole day, at times we don't get good service even if we pay.

You are simply amazing

 

Regards and Thanks,
Sam

Email :


5 . 2010-02-26 15:57:11

Max wrote:

I only mean the errors reported by the browser, under Firefox for example Tools > Error Console or Ctrl + Shift + J
It is clear there is something going wrong but with no details we cant do nothing. By the way I dont fully understand your last reply, but this is not important Smile

Email :


6 . 2010-02-26 15:14:07

Sam wrote:

 

<!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:EN-GB;} span.EmailStyle15 {mso-style-type:personal; mso-style-noshow:yes; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:Arial; mso-ascii-font-family:Arial; mso-hansi-font-family:Arial; mso-bidi-font-family:Arial; color:windowtext;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

Max,

 

I don't find other JavaScript errors within the page.

 

Can you do me a favor by putting a "example" for scenarios like this?

I believe you would be in a better position to do this as you know your script very well.

 

This will bring a whole new dimension of users for your script as it makes possible to install filters to any websites having table.

 

Regards

Sam

Email :


7 . 2010-02-26 15:13:54

Sam wrote:

Max,

 

I don't find other javascript errors within the page.

 

Can you do me a favour by putting a "example" for scenarios like this?

I believe you would be in a better position to do this as you know your script very well.

 

This will bring a whole new dimention of market to your script

 

Regards

Sam

Email :


8 . 2010-02-26 14:40:02

Max wrote:

Sam, if those things don't work, there must be javascript error(s). It would be interesting to see them...

Email :


9 . 2010-02-26 12:22:39

Sam wrote:

Max,

 

The selects are not populated with the values present in the respective column

Also, the filter button is not at all working

 

When i tried using external filters and the following did not had any impact.

tf_Table1.PopulateSelect(2, true, 'TargetSite');

 

Also, a custom button executing  tf_Table1.Filter(); did not give the desired output.

 

Simply, do i have to initialize something else to allow these things to happen?

 

Regards

Sam

Email : ezrasam AT gmail DOT com


10 . 2010-02-26 12:02:47

Max wrote:

What is the error exactly concerning the filters that are not populated? Everything looks fine from what I can see.

Email :


11 . 2010-02-26 10:11:26

Sam wrote:

Max,

 

Following info may help.

1)  I initialize the script using a bookmarklet like the following one.

javascript:(function(){MyToolBoxScript=document.createElement('SCRIPT');MyToolBoxScript.type='text/javascript';MyToolBoxScript.src='http://localhost:7000/MyToolBox/MyToolBox.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(MyToolBoxScript);})();

 

2) This inturn initializes the tablefilter.js

3) I am calling the function below, using the following kept at the end of tablefilter.js

(function(){
MyTabFilt();
})()

function MyTabFilt()
{

    var Table1_Props = {
        filters_row_index: 1,
        alternate_rows: true,
        sort_select: true,
        rows_counter: true,
        rows_counter_text: "Displayed : ",
        col_0: "None",
        col_1: "select",
        col_2: "multiple",
        col_3: "select",
        col_4: "select",
        col_5: "None"

};

    setFilterGrid( "Table1",Table1_Props);

}

 

4) Filter bar is generated

5) Now, the problem is the filters are visible but not functioning. selects are not getting populated.

I checked for client side errors, it is functioning properly.

 

I hope this gives you a view

Email : ezrasam AT gmail DOT com


12 . 2010-02-26 09:54:16

Max wrote:

I can't help more, I need more information. Also make sure there are no client script errors coming from other scripts, for example, remove the setFilterGrid call and check if there are client-side errors.

Email :


13 . 2010-02-26 09:33:53

Sam wrote:

Thanks Max,

This solves the error, however that was not enough i guess.

The filter function is not working in both case using an external filter or not. Also the selects are not populated.

 

Your help will be greatly appriciated.

Sam

Email : ezrasam AT gmail DOT com


14 . 2010-02-26 08:52:52

Max wrote:

Hi Sam,

please make sure the TF script is loaded in the page and you call the setFilterGrid method once the targeted table is rendered.

Email :


Top of page

180 . 2010-02-13 09:48:51

Randall wrote:

Hi again, 

first of all, thanks for your kindly help last time. This time, I want to provide a drop-down list somewhere in my page but not in the table for selecting sorting condition. Are there any way to do so?? Thanks.

Randall

 

Email : monohei AT gmail DOT com


0 Reply

Top of page

181 . 2010-02-08 14:53:08

Randall wrote:

I have a problem with version 1.9.6. 

If I use SetFilterValue(index,searcharg) to set the search string and I set all the columns to “none”, the result can only show the string with fully match even I set the exact_match to false but I want to show all string which is even not exactly match. 

Please refer this example which is modified from example 8 in this site. If I type in “As”, I want to show the records of ‘Asia’ and ‘Middle East’ but now it shows nothing. How can i solve the problem?

I have spent time on this problem for a day already. Thanks for your early reply.

 

Randall

Email : monohei AT gmail DOT com


3 Replies

1 . 2010-02-10 16:02:08

Randall wrote:

Hi Max, you are very helpful. thanks and enjoy you trip.

Email :


2 . 2010-02-10 08:44:22

Max wrote:

I am currently on a business trip. Instead of seeting all filters to 'none' try just to set filters row to display:'none'. This should work.

Email :


3 . 2010-02-10 07:41:37

Randall wrote:

Hi all, could anyone help?? Thanks. 

Email : monohei AT gmail DOT com


Top of page

182 . 2010-02-05 22:21:31

Mike Viens wrote:

I have found a small bug with version 1.9.6.  If alternate_rows is set to true, and in the sort_config there is a definition for sorting a column upon load, then the colors of the sorted rows are no longer alternating.

It appears like the row colors are set first, then a sort is being done.  It should be the opposite of this.  I suspect you do not see this on any of your demos because sorting is case-sensitive.  Try adding a column with case-insensitive sorting and the data is mixed case.

If it helps, here is my config:

 

var props =
{
    alternate_rows: true,
    btn: true,
    btn_text: "Filter",
    btn_reset: true,
    btn_reset_text: "Clear all filters",
    col_0: "none",
    col_6: "none",
    even_row_css_class: "evenRow",
    flts_row_css_class: "fltrRow",
    loader: true,
    loader_html: "<img src=\"/scripts/tf/img/loader.gif\" style=\"vertical-align:middle;\" /><span id=\"lblStatus\"></span>",
    odd_row_css_class: "oddRow",
    paging: false,
    rows_counter: true,
    rows_counter_text: "Displayed rows: ",
    sort: true,
    sort_config:
    {
        sort_col: [1, false],
        sort_types:["None", "CaseInsensitiveString", "CaseInsensitiveString", "CaseInsensitiveString", "CaseInsensitiveString", "Number", "None"]
    },
    status_bar: true,
    status_bar_target_id: "lblStatus"
}
setFilterGrid("mapping", props);

 

Mike V.

Email : mike AT viens DOT com


3 Replies

1 . 2010-02-11 13:33:42

Max wrote:

Mike, in that case try exactly the same thing on the on_filters_loaded event:
...
on_filters_loaded: function(o){ o.SetAlternateRows(); },
...

Email :


2 . 2010-02-08 20:21:56

Mike Viens wrote:

Thank you for the suggestion.  It does not work, however, on the initial load.  The function is not being called on the initial load (I put an alert() statement in to verify).  The function does get called each time I change the sorted column or order though, so I know the function is working properly.  It just seems to be the intial load that is the problem.

I tried to find the sequence in tablefilter.js and tfAdapter.sortabletable.js, but I was not able to follow it completely.  It seems to me like the rows are being set before the sort, but should be done after any sort.  Again, this is only an issue when specifying an initial sort.  After every other sort, it is working as expected.

I did notice a second VERY small bug related to sorting and row alternating.  When initially displayed, the first row is white, then followed by gray.  After clicking any header to resort, the first row is now gray and the second row is white.  This is not a big deal to me, but rather just an inconsistency I thought You might want to fix (some day).

Mike V.

Email : mike AT viens DOT com


3 . 2010-02-06 18:59:04

Max wrote:

Mike,
what you could do is to use in your cofiguration object the on_after_sort event in order to re-apply the alternating rows:
...
on_after_sort: function(o, colIndex){ o.SetAlternateRows(); },
...

 

Email :


Top of page

183 . 2010-02-03 02:34:45

Chris wrote:

Hi Max,

first, you've made a great script, merci beaucoup!

 

I've got a table witch checkboxes for filtering (col_0: "checklist). Your script is originally designed to show a "reset" checkbox on the first position. I'd like to deactivate that, because there's already a global reset link (btn_reset) on top of the table! All I found out is to edit the displayed text (display_all_text: "[reset]"). I managed to deactivate the unwanted reset-checkbox by deleting blindly this line: ul.appendChild(li0); in the function AddCheck0()

Badly the global-reset function doesn't work after this nasty script modification. Have you a clue how to do it the right way? A display_all: false option would be very nice.

 

 

Another point is that the script doesn't like the angle bracket < and > as table data. It shows up in the filter list but you can't filter it.

 

Thanks in advance

Chris 

 

 

Email : klee99 AT gmx DOT de


1 Reply

1 . 2010-02-11 18:06:54

Max wrote:

I never tried to do so. May be try to remove programmatically the 1st undesired option once the fillters are generated...

Email :


Top of page

184 . 2010-02-02 17:07:02

Kraiosis wrote:

How can i set initial table rows hidden to alow only show selected rows at filters.

Email : astpublicidad AT do DOT occidentalhotels DOT com


1 Reply

1 . 2010-02-03 22:10:13

Max wrote:

Kraiosis, try to set the display property of each row to 'none' (<tr ... style="display:none;">) and this should be enough.

Email :


Top of page

185 . 2010-02-01 10:29:08

ZavHoz wrote:

Your table filter is awesome. Completely everything works fine. I use it in my wordpress site. But i've got 2 problems:

1) I cannot disable sorting in drop-down list it always use an alphabet sorting, when i use "sort_select: false" table_filter stops working. Can you give ьу an examle with working disabled sort in drop-down list?

2) Is it posible to make a point in drop-down list that hide all the table, and make this point default when you first time open the table? Or is there any comand that hide all the table until you choose anything in drop-down list.

Thank you in advance.

P.S. sorry for my english, i'm from Russia

Email : zavhoz84 AT gmail DOT com


2 Replies

1 . 2010-02-03 08:57:20

Max wrote:

Hello ZavHoz,
to set a value in a filter (no matter the type of filter), please use the SetFilterValue(index, searcharg) method. For inspiration, please have a look to the doc page: http://tablefilter.free.fr/doc_methods.php and also to this demo page: http://tablefilter.free.fr/data-types.htm

Email :


2 . 2010-02-01 13:41:24

ZavHoz wrote:

I have fix the problem with sorting drop-down list. Also I found salvation how to hide the table before you make a choice in drop-down list. The only thing left to find out is fixing default choice from drop-down list before you make a choice. I mean when i open the page with the table, there must be already selected the point i need from the drop-down list.

Please, could you give an advice.

Thank you in advance.

Email : zavhoz84 AT gmail DOT com


Top of page

186 . 2010-01-26 19:30:07

Courtney wrote:

Never Mind!

it works beautifully. Stupid question.

Thanks

Email : courtneyredding AT mac DOT com


0 Reply

Top of page

187 . 2010-01-26 19:07:02

Courtney wrote:

Greetings

Love your table Filters! Best I've seen.

Trying to recreate the External filters table (http://tablefilter.free.fr/external-grid.htm) wondering if you have a link with all of the pieces. I've pulled all the downloads off your site as well as html files serving page.

I've gotten pretty far but think I'm missing something. http://wonderdash.com/external-grid.htm

Apologize if this is a stupid question and everything is included in download I will go back and try again.

Just let me know.

Email : courtneyredding AT mac DOT com


0 Reply

Top of page

188 . 2010-01-22 13:53:55

Theo wrote:

Hi guy, i have a question about the 'alternate_rows' property.

When i connect to the page(where the table is) for the first time and there's no filters applied the 'alternate_rows' doesn't work, just when i filter the table the 'alternate_rows' activate and the rows are colorized.

What's happening?

thanks

Email : linkinmyhead AT hotmail DOT com


2 Replies

1 . 2010-02-01 17:56:06

Theo wrote:

That works

thanks man!

Email :


2 . 2010-01-28 21:48:34

Max wrote:

Theo, try to use the SetAlternateRows() method in order to apply programmatically the alternating colors once the TF object is instanciated, just after the setFilterGrid method is called.

Email :


Top of page

189 . 2010-01-20 16:30:14

Laura wrote:

I have one small quesiton about the sort icons. In IE when a column is not sorted, there is a small empty square next to each header where if the column is sorted, the sort icon appears. Then when a column is sorted, the sort icon appears in this square. In firefox, there is no small empty square, but there is no icon appearing upon sort.

 

How can I remove the small empty squares, and only show the sort icon upon sorting in IE? and how can I show the icon at all in FF?

 

Thanks

Email :


1 Reply

1 . 2010-01-21 13:43:10

Max wrote:

Laura, it seems to me the arrows that are supposed to appear are not at right location or do not exist in your project. In any case, make sure you have:

  • a img folder containing the arrows images at same location than tablefilter.js file
  • a filtergrid.css file loaded in your page
  • a correct path in the image_path and image_blank variables in the tfAdapter.sortabletable.js document

Email :


Top of page

190 . 2010-01-19 09:48:51

Sam wrote:

Max,

Can you help me to get the columns visibility menu horziontally?

Its default is vertical.

 

Regards

Sam

Email : ezrasam AT gmail DOT com


1 Reply

1 . 2010-01-19 11:14:52

Sam wrote:

Figured It out with some CSS tweaks

Email : ezrasam AT gmail DOT com


Top of page

191 . 2010-01-17 20:40:14

wap3 wrote:

I hope I am missing something but so far I have not been able to get functionality working as I need.

These problems have been both at home and work.
Slighty different work is directly in Win2k and home is Mepis Linux, VituralBox with Win2k.
Server2go is on both to allow development without accessing the website.

1) turn on grid layout and fixed columns are somewhat ok, column widths vary from headers and if column resizing is used then the alignment becomes worse and at times unacceptable [break is near 1/2 of header].

2) Using Extensions does not work with "Grid Layout"

3) Can use Resizer OR Filter Visibility WITHOUT Grid Layout [lots of css work later to nice "grid layout"] but can not use together - neither work but turn off Grid Layout and Filters works but not Resizer.  Also Column Widths are ignored and this table actually needs to be some 2000 px wide.

4) using only Grid Layout and Filter Visibility causes the 2 row of the table data to show/hide - not the filters

Email : wap3 (at) wap3 (dot) com


3 Replies

1 . 2010-01-27 14:47:20

Max wrote:

Wap3, I have posted a fix for the Columns Visibility extension at this demo page:
http://tablefilter.free.fr/grid-layout.htm

Email :


2 . 2010-01-24 20:20:18

wap3 wrote:

Thanks for your answer.

I have concluded, prior to reading, that I have to continue and watch the updates and hope what I need gets there.
The formating usable but aligned headers and columns would be nice.

Currently I removed all formating from the php file, except I must have a RowID, because that is time stamp when the recored was created and thus needed for update and delete of records.

Also 2 of my projects have multi-line text with variable width so I can not give up the config col_width[....] and header html widths, as cells must match look/feel of textarea control.

Thanks for your work.

Email :


3 . 2010-01-21 14:02:45

Max wrote:

Wap3, concerning the layout problems, make sure you don't have any style, class, widths, heights, defined in your table, trs, ths, tds etc. The best thing is to have a completely 'naked' table as you can see in the demo page, note that the cellpadding and cellspacing attributes are set to 0. This is a prerequisite for the column resizer feature.
Concerning the Columns Visibility extension, I confirm it doesn't work with the Grid Layout feature.
As a first solution I will hopefully provide a fix to implement the columns visibility feature by using the tablefilter events without changing the code of the extension and/or tablefilter.js documents. Then when this temporarily solution will be online on the demo page I will work on the columns visibility extension to make it compatible with the grid layout mode.
I will post a new comment to this whenever the fix is available.

Email :


Top of page

192 . 2010-01-08 21:42:24

Matteo wrote:

Hi all,

I have a problem with the thousand format. It seems that tablefilter can't manage values like 10.000.000

An example :

<table id="tableRenewals">
 <thead>
 <tr>
  <th>A</th>
  <th>B</th>
 </tr>

 </thead>
 <tbody>
<tr><td>10.000.000</td><td>20.000</td></tr>
<tr><td>20.000.000</td><td>40.000</td></tr>

</tbody>
<tfoot>
 
 
         <tr id="totRowIndex">
            <td id="totalA"></td>
   <td id="totalB"></td>
          </tr>

</tfoot>
</table>

 

var totRowIndex = tf_Tag(tf_Id('tableRenewals'),"tr").length;

 var table_Props =  {
     loader:true,
     loader_text: "Filtering data...",
     filters_row_index:1,
     enter_key: true,
     decimal_separator: ",",
     thousands_separator: ".",
     col_number_format: ['eu','eu'],
     col_operation: {
        id: ["totalA","totalB"],
        col: [0,1],
        operation: ["sum","sum"],
        write_method: ["innerHTML","innerHTML"],
        decimal_precision:[0,0],
        exclude_row: [totRowIndex]
       },
     rows_always_visible: [totRowIndex],      
    };
setFilterGrid( "tableRenewals",table_Props );

 

 

Do you have any idea or workaround ?

Thanks in advance

Cheers

Matteo

Email : matteozardini AT gmail DOT com


2 Replies

1 . 2010-01-13 14:35:06

Matteo wrote:

Hi Max,

I've tried the new release and it works perfectly.

Thank you very much !!

Cheers

Matteo

Email : matteozardini AT gmail DOT com


2 . 2010-01-09 12:27:59

Max wrote:

Hi Matteo,
thanks for pointing out this bug with numeric values. Here you have a quick fix that overwrites the method in the script that is supposed to remove the numeric formats (thousands separators). Just place the script block below just after this line in your document <script src="tablefilter.js" language="javascript" type="text/javascript"></script>:

...
<script language="javascript" type="text/javascript">
function tf_removeNbFormat(data,format)
{
    if(data==null) return;
    if(format==null) format = 'us';
    var n = data;
    if( format.tf_LCase()=='us' )
        n =+ n.replace(/[^\d\.-]/g,'');
    else
        n =+ n.replace(/[^\d\,-]/g,'').replace(',','.');
    return n;
}
</script>
...

If you want to format your totals please refer to this demo page: http://tablefilter.free.fr/data-types.htm

The above correction will be available in the next version of the script (v 1.9.6).

Cheers

Email :


Top of page

193 . 2010-01-04 19:00:23

Jim Brook wrote:

Thank you again for this wonderful resource.

I am having a similar problem to Guido. On my 2 Windows 7 machines running IE 8 I have 3 different search boxes  at the head of columns. If I type a search term into them and press enter, the text immediately disappears and no selection is made. The columns with a drop down list work fine.

This problem has only occurred since moving to Windows 7. I have XP and Vista machines running IE 8 and the problem does not occur with them. The problem does not occur with Firefox or Chrome

Thank you again.

 

Email : jbrook AT clear DOT net DOT nz


1 Reply

1 . 2010-01-09 11:11:17

Max wrote:

Jim,
unfortunately for the moment I have no access to pcs running Windows 7 OS. Thanks for pointing this out, I will have a look whenever I will have the possibility.

Email :


Top of page

194 . 2009-12-04 21:16:37

guido wrote:

thanks for this great script!

in IE7 it works perfect, however in IE8 the filters won't fill up with data..

do you perhaps know why?

thanks!

Email : guido DOT berghmans AT gmail DOT com


0 Reply

Top of page

195 . 2009-12-04 17:53:24

Mike wrote:

Hello,

First of all thanks for this nice script!

I configured the column width with the col_width property. However the column width remains the same (and even more surprising, the drop down lists become textboxes in the affected columns).

I assume content of the drop down list (filter) determins the width the columns?

Is there anayway to reduce the width of these filter boxes?

Thanks in advance!

Email : bijlesvoorjou AT gmail DOT com


0 Reply

Top of page

196 . 2009-12-03 00:00:35

Werner wrote:

First of all thanx for the great script..

I have on question (feature request), would it be possible to search mulitple values in a cell (Comma Separated values in cell), preferable with an && operator.

So when i search for "Foo1" and "Foo2", only rows containing the filtered cell value: Foo1 AND Foo2 return.

Hoping i made this clear.. i would be happy to give more detail!

Thanx!

Email :


1 Reply

1 . 2009-12-03 13:46:32

Max wrote:

Werner, if you'd like to filter comma separated values in a specific cell, this is not possible with the script. May be by using the custom_cell_data event, you can achieve that by implementing your own filtering function for the current cell. Check the doc page http://tablefilter.free.fr/doc.php#grid_behave and related demo page http://tablefilter.free.fr/custom-data.htm to see how this event works.

Email :


Top of page

197 . 2009-11-23 15:04:36

Seshagiri rao wrote:

I am using columns resizing for fixed headers.

The code is below that i implemented

                  //Column resize feature
                  extensions: {
                                 name:['ColumnsResizer'],
                                  src:['TFExt_ColsResizer.js'],
                                   description:['Columns Resizing'],
                                  initialize:[function(o){o.SetColsResizer();}]
                               },
         col_resizer_all_cells: true

i set filetergrid ad setFilterGrid("demo",0,props); and i removed styles and attributes for td definitions.

I am getting error as follows

Error: TF is not defined
Source File: file:///D:/TFExt_ColsResizer.js
Line: 29

Could any body help me to solve the problem? is it posible to implement columns resize for fixed headers? Please give solution as soon as possible. Thank you.

Email : seshagirirao DOT raya AT gmail DOT com


5 Replies

1 . 2009-11-25 05:34:08

seshagiri rao wrote:

Hi Do you considered div width to calculate for resizing columns? if yes, could you please modify the script to consider the width tables( ie header table and data table). So that all columns are able to resize even they are hide inside the div. I hope you are understand my concept.

Email : seshagirirao DOT raya AT gmail DOT com


2 . 2009-11-23 16:51:45

Seshagiri rao wrote:

Sorry, i did mistake in my reply.

If once i scroll horizontale bar no columns are not scrolled(even first few columns). please read this sentence as

If once i scroll horizontale bar no columns are not resized(even first few columns).

Email : seshagirirao DOT raya AT gmail DOT com


3 . 2009-11-23 16:49:31

Seshagiri rao wrote:

Yes, with the help of that example i have done. when i implementing column resizing, column visibility was not working.

But i have 26 columns in my table. And i made it scroll horizontally(x-direction) to view all columns. When i implementing only column resizing(without column visibility), i can able to resize few columns which are appearing, on the screen when the page first time loaded. If once i scroll horizontale bar no columns are not scrolled(even first few columns).

if i am implemented with column visibility manager, it was not appearing on the page. i need to implement, filters, scrolling to see all columns, column resizing and column visibilty manager in one table.

http://www.activewidgets.com/javascript.forum.9811.1/header-fixed-not-grid.html(which is Mr Suresh suggested link) please add the features with our demos(add features filters, column resizing, column visibilty manager) to active widgets model. (to http://www.activewidgets.com/javascript.forum.9811.1/header-fixed-not-grid.html)

Email : seshagirirao DOT raya AT gmail DOT com


4 . 2009-11-23 15:58:06

Max wrote:

Seshagiri rao, please note you have a demo page featuring columns resizing and fixed headers at:
http://tablefilter.free.fr/fixed-headers.htm

Email :


5 . 2009-11-23 15:14:20

Seshagiri rao wrote:

While i am implementing columns resizing, columns visibilty manager is not appearing on the page. if i am not implementing coulmns resizing  then columns visibility manager working

Email : seshagirirao DOT raya AT gmail DOT com


Top of page

198 . 2009-11-23 12:18:37

piepiax wrote:

Hi max,

 

Its again me Sealed, I have another question/suggestion !

It seems to be not possible to apply the grid on a table with TD rowspan.

Indeed, im my tables, I could have several values for 1 index and actually I have to put all the possible values into 1 TD cell.

I think that it's more readable to have each value into 1 TD cell associated to 1 index via rowspan and if I want to filter on value column, I will get only the row with index and the filtered value and all the values.

Tell me if i'm not clear and Do you think it's possible to implement this functionnality ?

Piepiax

Email : piepiax aatt free dottty fr


2 Replies

1 . 2009-11-26 10:17:38

piepiax wrote:

Thanks for your reply ! but it doesn't heard as I want Cry

Anyway, The script is very useful !

Email :


2 . 2009-11-25 21:44:56

Max wrote:

Hi Piepax, the TD rowspan is not supported by the script. To implement it, the whole script should be re-coded, I guess... Frown

Email :


Top of page

199 . 2009-11-20 12:21:58

Sisao wrote:

Hey good job with this tool i find it pretty useful and functional.

You know why my last row is always shown, on every page of the table set?

This is code i use right after the table definition:

<script language="javascript" type="text/javascript">
//<![CDATA[
    var table_Props = {
                            grid: false,
                            paging: true,
                            paging_length: 15,
                            btn_next_page_text: 'Next >',
                            btn_prev_page_text: '< Prev',
                            btn_last_page_text: 'Last >>',
                            btn_first_page_text: '<< First'
                            //refresh_filters: true
                        };
    setFilterGrid("table",table_Props);
//]]>
</script>

 

And how can i dinamically adjust the buttons frame size to fit the table weight? Cant find the proper setting in the css or from the doc section of this site.

Regards.

Email : sisao80 AT gmail DOT com


0 Reply

Top of page

200 . 2009-11-18 00:16:14

MIchael wrote:

I am using the Column resize feature it works with single drop, but not with multi select. Iam I doing something incorrect?

MIchael

Email :


1 Reply

1 . 2009-11-23 13:33:30

Max wrote:

Michael, please check this demo page: http://tablefilter.free.fr/cols-resizer.htm

Email :


Top of page

201 . 2009-11-17 20:26:34

Suresh wrote:

Hi max,

Very Nice script. Could you please post column scrolling horizontally and table srolling vertically, with fixed headers. and please include column visibilty, and column resizing with the demo.

Email : sureshsk DOT muvva AT gmail DOT com


3 Replies

1 . 2009-11-22 19:17:14

Max wrote:

Suresh, sorry but what do you mean by that? I am aware of the activewidgets library, and so what?

Email :


2 . 2009-11-22 04:58:20

Suresh wrote:

As per your request http://www.activewidgets.com/javascript.forum.9811.1/header-fixed-not-grid.html

Email : sureshsk DOT muvva AT gmail DOT com


3 . 2009-11-20 13:46:54

Max wrote:

If you feel like implementing the headers table scrolling synchronisation with the content table you can give me a sign Tongue out

Email :


Top of page

202 . 2009-11-17 12:50:00

piepiax wrote:

Hi max and other readers,

 

I have a little suggestion for the extension's style sheets loading.

Indeed, I suggest to add a css property in the extension declaration in order to avoid the edition of the .js when the .css is not in the same folder than the .js and/or change name.

Here the modif in the .js (example with TFExt_ColsVisibility_1.1.js - same form for others)

[code]

line71:

      Before => o.showHideColsStylesheet = 'TFExt_ColsVisibility.css';

      Now    =>

line 131:

      Before => o.IncludeFile(ext.name+'Style', o.showHideColsExtPath + o.showHideColsStylesheet, null, 'link');

      Now     => o.IncludeFile(ext.name+'Style', o.showHideColsStylesheet, null, 'link');

 

What do you think about this ? And is it possible to add these few modifications in the next release of the extensions ?

Piepiax

 

Email : piepiax aatt free doty fr


2 Replies

1 . 2009-11-20 13:43:34

Max wrote:

Hi Piepiax, thanks for your useful contribution. I will add this to all the extensions!

Email :


2 . 2009-11-17 12:57:04

piepiax wrote:

Sorry,

I do enter !

I resume my post

Here the modifs for the .js (example with TFExt_ColsVisibility_1.1.js - same form for others)

[code]

line71:

      Before => o.showHideColsStylesheet = 'TFExt_ColsVisibility.css';

      Now    =>  o.showHideColsStylesheet =   f!=undefined && f.ColsVisibility_Stylesheet!=undefined

                                                 ? f.ColsVisibility_Stylesheet : o.showHideColsExtPath + 'TFExt_ColsVisibility.css';

line 131:

      Before => o.IncludeFile(ext.name+'Style', o.showHideColsExtPath + o.showHideColsStylesheet, null, 'link');

      Now     => o.IncludeFile(ext.name+'Style', o.showHideColsStylesheet, null, 'link');

[/code]

 

Here the extension property to declare

[code]

              extensions: {
                        /*** Columns Visibility Manager extension load ***/
                        name:['ColsVisibility'],
                        src:['./js/TFExt_ColsVisibility.js'],
                        description:['Show/Hide columns'],
                        initialize:[function(o){o.SetColsVisibility();}]
                },

                /*** Columns Visibility Manager extension properties ***/
                ColsVisibility_Stylesheet:'./css/TFExt_ColsVisibility.css'
[/code]

What do you think about this ? And is it possible to add these few modifications in the next release of the extensions ?

Piepiax

Email :


Top of page

203 . 2009-11-15 20:35:39

Glen Leslie wrote:

Can someone tell me what super simple, newb-like mistake I'm making here?  the Filters will *not* show up at the top of my table.  I'm using IE7 (also tried with FF 3.5.5) with a local IIS7.  Other javascripts work fine (I was actually using a competing solution from javatoolbox.com but want to use the tablefilter.js due to it's superior configurability (based on docs)).

This page will *not* display the basic/default filters in my browser:

 

 

Email :


3 Replies

1 . 2009-11-20 13:48:23

Max wrote:

From what I understand, it is fine now...

Email :


2 . 2009-11-15 23:07:01

Glen Leslie wrote:

somebody correct me if I'm wrong but the script statement has to come after the table definition...? 

that seemed to fix all the examples I had where it wasn't working t all. 

Email :


3 . 2009-11-15 20:39:18

glen leslie (finish the post) wrote:

(i guess it's just not my day... i had opened this editor in FF 3.5 and copy/past is not supported) -- my email is also posted in this 2nd part of the original post.

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Test</title>

<script language="javascript" type="text/javascript" src="tablefilter.js"></script>
<LINK REL=StyleSheet HREF="filtergrid.css" TYPE="text/css" MEDIA=screen>
</head>

<body>

<script language="javascript" type="text/javascript">
setFilterGrid("wldtbl");
</script>

<table id="wldtbl" class="mytable" cellpadding="0" cellspacing="0">

          <caption>
          WORLD INTERNET USAGE AND POPULATION STATISTICS
          </caption>
          <tr>
            <th>World Regions</th>
            <th>Population ( 2007 Est.)</th>
            <th>Population % of World</th>
            <th>% Population ( Penetration )</th>

            <th>Usage % of World</th>
          </tr>
          <tr>
            <td>Africa</td>
            <td>933,448,292</td>
            <td>14.2 %</td>
            <td>3.5 %</td>

blah

blah

blah

 

Email : glen_leslie AT pobox DOT com


Top of page

204 . 2009-11-13 11:59:38

Dragonlord wrote:

Hi Max,

I have two tables with same data (i used one filter to filter both table)

but i dont know how i can use (one "Page" and "Results per page") to filter both table!

How i can transfer this values to other table?


Thanks,

Email : dragonlord888 AT hotmail DOT com


1 Reply

1 . 2009-11-20 13:41:08

Max wrote:

Hi Dragonlord, you should use the SetPage method (myTF.SetPage('next');) to achieve that. For the results per page drop-down list you will need implement your own javascript function. Note that, the id of the results per page drop list is built as follows: myTF.prfxSlcResults + myTF.id
If the table id is 'demo' then drop-down element can be accessed in this manner:
tf_Id(tf_demo.prfxSlcResults + tf_demo.id)

Email :


Top of page

205 . 2009-11-10 19:15:43

Neil wrote:

No questions, worked first time.

Many thanks for an extremly useful script.

Email : neil AT ndmacpherson DOT freeserve DOT co DOT uk


0 Reply

Top of page

206 . 2009-11-10 10:14:25

Milan wrote:

Hi.

 

first: this is very very nice work.

second: my problem

how i use refreshGrid() externaly from javascript function? i programming reorder fields via externaly ajax function (with mysql) and i need refresh grid after reordering is complete.

thanks a milion

 

*sorry for my english

Email : matuska AT email DOT cz


3 Replies

1 . 2009-12-14 16:23:46

Marco Ribeiro wrote:

I have exactly the same problem... I have two separate tables (different id's) and I move rows from one to another with javascript and when I make the refreshgrid the thead is duplicated...

Could you give some help?

Best regards

Email : marco DOT lob AT gmail DOT com


2 . 2009-11-12 18:03:15

Max wrote:

Milan,

make sure you don't add the grid everytime you refresh ajaxly the table. Use the RefreshGrid method to re-generate the filters.

Email :


3 . 2009-11-10 10:58:58

Milan wrote:

i forgot... this is my code:

 

function reorder(move,position)
{

   xxxxxxx.....

    myTF.RefreshGrid();
}

function constructor_table_1()
{
    var properties =
            {
                sort: true,
                sort_config: { 
                     sort_types:['None','String','String','Number','Number','Number','ymddate']
                 },
        
                 paging: true, 
                 paging_length: 50,
                 paging_btns: true,
                 page_selector_type: 'select',
                
                 rows_counter: true,
                 rows_counter_text: 'Records:',
                 results_per_page: ['Records per page',[50,100]], 
                 msg_change_results: 'loading...',
                
                filters_row_index: 1,

                alternate_rows: true, 
               
                col_0: 'none',
               
                status_bar: true,  
                on_change: true, 
                loader: true, 
                loader_html: '<img src="loader.gif" alt="" style="vertical-align: middle; margin-right: 5px;"><span id="\lblStatus\"></span>',
                msg_filter: 'filtering...',
                msg_sort: 'loading...',
                status_bar: true,
                status_bar_target_id: 'lblStatus',
                on_keyup: true,
                on_keyup_delay: 1200,

                msg_change_page: 'loading...',
               
               
            }
            myTF = new TF("adminFormTable",2,properties)
            myTF.AddGrid();
            //]]>
}

 

this code after call function reorder() don't refresh the table, but add new header and filterinputs on top of the table. btw. how to set new data to the table in function reorder()?

Email :


Top of page

207 . 2009-11-06 06:40:14

Satya wrote:

Hi Max,

Thanks for the wonderful script and it is very useful for us in one of our web application. We are having few issues with date sorting. We need to display our date filed in grid as "MM/DD/YYYY HH24:MM:SS ET" always in Eastern Time. We are getting this date as Date/String object in JSP. But when we try to do sort on this date field it is not sorting properly. For example, if I have two dates like "09-09-2009 11:32:48" and "10-09-2008 11:32:31". 09-09-2009 is coming first followed by 10-09-2008 in ascending order.

Below are the config params we are using in our JSPs. I tried getting these date values as Date object and as String objects. But in both the cases sorting is not working. Please help us to fix this issue.

var toDoTableFilters = { 
     col_1: "select",  
     col_5: "select",  
     enter_key: true,
     filters_row_index: 1,
            alternate_rows: true,
         fixed_headers: false,
         paging: true,
         paging_btns: true,
         paging_length: 10,
         results_per_page: ['Results per page',[10,20,50,100]],
         page_selector_type: 'select',
         btn_next_page_text: 'Next >',
         btn_prev_page_text: '< Prev',
         btn_last_page_text: 'Last >>',
         btn_first_page_text: '<< First',
     display_all_text: "Show all",
     rows_counter: true,
     rows_counter_text: "Displayed rows: ",
     btn: true,
     btn_text: "Go",                  
     btn_reset: true,
     btn_reset_text: "Clear Filters",
         status_bar: true,        
     tbody_height: 400,
     sort: true,
     msg_sort: 'Sorting Please Wait...',
     default_date_type: 'MDY',
     sort_config: {  
         sort_types:['Number','mdy','String','String','String','String','String','String']
     }
    }            
setFilterGrid("toDoTxnList",1,toDoTableFilters);

Once again thanks a ton for your great effort and work.

Thanks and Regards,

Satya

 

Email : satyakirandotsanipiniatgmaildotcom


2 Replies

1 . 2009-11-16 05:28:20

Satya wrote:

Thanks Max for your quick reply.

As a workaround we are using the date format as YYYY/MM/DD HH24:MM:SS ET and we are getting this value as String on to the screen. This is the ONLY format with which date sorting is working correctly with the current code.

Once again thanks a lot for your reply and your effort on this wonderful component.

Best Regards,

Satya

Email :


2 . 2009-11-09 14:08:01

Max wrote:

Satya, I am afraid the datetime format with the time also expressed is not supported by the script Frown This is something that needs to be developed (tf_formatDate function in tablefilter.js needs to be improved)

Email :


Top of page

208 . 2009-11-06 01:22:17

TuxX wrote:

Great work! I love it!

Is it possible to use the Pagination at the top AND the bottom of the table?

Thank you

TuxX

 

Email : christian DOT arth AT googlemail DOT com


1 Reply

1 . 2009-11-07 09:32:04

Max wrote:

Hi,
you can create your own paging buttons and place them at desired location in your page. Check this demo page and tick the paging option, you will have custom paging buttons appearing at bottom of the green panel:
http://tablefilter.free.fr/external-grid.htm

Email :


Top of page

209 . 2009-11-02 21:00:09

Radu wrote:

Great work, although I don't like javascript I have to admit that this is a great piece of work!

I have a quicq question: I want to delete an antry from the table (for example using document.getElementById('demo').deleteRow(index)). Do I have to execute any public method to have the table filtered again? I'm asking because if I try to delete an entry and fileter my data after that, I get a "Processing: Filtering data..." pop-up that won't disappear, and noticed also that the "Result per page" is messed up

Thank you,
Radu

 

Email :


5 Replies

1 . 2009-11-08 21:08:48

Radu wrote:

Hi Max,

Thanks a lot for the code, that worked like a charm!! The thruth is that was the only thing I haven't tried but that's because the "nbRows" property is not displayed as public in the doc, you might want to review the doc page. I'm sure that's the last thing you are worried about and as long as my script works I'm happy. Smile

Again, thanks a million for this wonderful script! Keep up the good work!

 

Cheers,

Radu

Email :


2 . 2009-11-08 18:29:58

Max wrote:

Radu, you made this change in the RemoveGrid method, right?

I confirm this is not safe, you better leave this.nbRows property in the loop. Now, we need to find why you get an error. From what I understand, since you deleted a row the number of rows is not same (nbRows), so everytime you remove a row you should update the nbRows property (nbRows-1) to reflect the actual nb of rows in the table.
Try this in your code:
...
document.getElementById('demo').deleteRow(cellId);
tf_demo.nbRows--;
tf_demo.RefreshGrid();
...

Email :


3 . 2009-11-08 01:53:26

Radu wrote:

It's me again... Problem fixed by changing the following line

for(var j=this.refRow; j<this.nbRows; j++)

with

for(var j=this.refRow; j<this.nbFilterableRows; j++)

 

Max, since you know the script better than me could you please confirm if this would break anything else in the script? I run just few tests and everything seems ok but I'm not 100% sure I'm doing the right thing.

 

Thank you,

Radu

Email :


4 . 2009-11-08 01:15:20

Radu wrote:

Hi Max,

I really appreciate that you took the time to read/answer my question. You were absolutelly right, a javascript error was causing the script to stop but the problem is that the error is thrown by the RefreshGrid method!!! I read your doc details in and out but can't figure out what I'm doing wrong. The remaining thing is to actually dig through the code... Hoping that you could bring some light here, here is the error I'm getting when running the following script:

function radu(cellId) {
    alert(cellId);

    document.getElementById('demo').deleteRow(cellId);

    tf_demo.RefreshGrid();

}

And here is the error:

row[j] has no properties
RemoveGrid()tablefilter_compr... (line 152)
__resetGrid()tablefilter_compr... (line 575)
radu(5)test.html (line 79)
{row[j].style.display='';...


Thank you,
Radu

Email :


5 . 2009-11-07 09:44:20

Max wrote:

Hi Radu, it seems to me you have some client-side errors disrupting the filtering script. In any case, if you change the table content (rows, cells etc.) use the RefreshGrid() method to re-generate the filters (tfObj.RefreshGrid() http://tablefilter.free.fr/doc_methods.php)

Email :


Top of page

210 . 2009-11-02 16:00:13

Laura wrote:

This is a great script. I used it successfully on a table of about 300 records, but now I am using it on a table that has over 4000 records and it is taking too long. It even causes a pop up to occur warning me that the there is a script that is taking too long and do I want to stop running it. When I take out this script it puts all 4000 records on the page, but when I include the scirpt (with and without paging) it takes much to long. Is there anything you can recommend to make it run faster?

 

Thanks

Email :


1 Reply

1 . 2009-11-04 10:14:25

Max wrote:

These are the recommendations I gave to Gary (in the archives section) for the same issue:

  • reduce the number of "select" filters if possible, this is what takes time: parsing cell values of each column and insert them in the drop-down filter
  • if above not possible, set the fill_slc_on_demand property to true, in fact, drop-down filters will be populated at first use only and not at page load (check http://tablefilter.free.fr/load-filters-on-demand.htm)
  • make sure there are not nested elements in each cell (ie ...<tr><td><table><tr><td>My cell value</td></tr></table> </td>...). It takes more time to retrieve the cell value especially under IE

Email :


Top of page

211 . 2009-10-30 17:03:37

Raju wrote:

Hi Max,

Great work!

It saved me a lot . Thank you very much for this.

I have a question:

I have a table with frist column with select say, <Show All>,<Option1>,<Option2>.

I want to default the selection to <Option1> whenever the table is loaded.

I have gone through the documention but didn't find any.

Could you please help achieving this.

Best Regards,

Raju

Email : aravala DOT raju AT gmail DOT com


3 Replies

1 . 2009-11-03 12:35:07

Raju wrote:

Hi Max,

 

i think, i am not letting the event to fire before calling the table.Filter();

When i setTimeout('table.SetFilterValue(0,'Option1')',100); and table.Filter();

Everything working fine.

Thanks

Raju

Email :


2 . 2009-11-02 14:38:22

Raju wrote:

Hi Max,

Thank you for the information. I tried this and its working perfectly in my windows-Mozilla/FF 2.0 environment.

But in Linux -Mozilla/FF 1.6 , this particular calls are not getting fired  unless i out some alert() in the function call.

It looks strange. Do you have any comments on this.

Thanks

Email :


3 . 2009-10-31 20:28:23

Max wrote:

Hi Raju,

you just need to use the SetFilterValue() method ( yourTFObj.SetFilterValue(0,'option 1 value here'); ) as described in http://tablefilter.free.fr/doc_methods.php and see an example in this demo page http://tablefilter.free.fr/data-types.htm

Email :


Top of page

212 . 2009-10-28 14:43:04

Azher Ibrahim wrote:

Hi

In case a table has a checkbox as the first column and a sort is done on any of the columns, the selections done in the checkbox gets cleared. Is there any way to keep the selections after the sort

Thanks in advance

Email : azher DOT ibrahim AT gmail DOT com


2 Replies

1 . 2010-04-02 12:50:12

Kusai wrote:

I am working on a nice project, and using the amazing features of this table filter.  However I am having a problem when I sort my table, the checkboxes values becomes empty.

 

I am saving each element id in an array in the value for the checkbox:

<td><input type="checkbox" name="array[]" value="<?echo $row['ID']?>" /> Add to select </td> 

and then after the form gets submitted, the array should contain the ids of the elemnts selected.  if I do not sort the table, the ids get stored in the table, but if I sort then the array is empty.

 

This example  http://tablefilter.free.fr/custom-data.htm does not have a form and an array to store the ids, so it doesn't really make it clear how to solve my problem.

 

Any help would be greatly appreciated.

Thank you,

Kusai

Email : kazarrugh AT gmail DOT com


2 . 2009-10-31 20:32:53

Max wrote:

Hi,
have a look to this page http://tablefilter.free.fr/custom-data.htm, where you have  a checkbox in 1st column and sort feature activated

Email :


Top of page

213 . 2009-10-23 14:16:29

Dan Garfield wrote:

Hi Max,

Another Ajax question I'm afraid. As I relooked my code, I've found that the Ajax table is working in Firefox, but not in IE. Even when I downloaded your Ajax examples and linked scripts etc (which I tried linking to both locally on my machine and through tablefilter.free.fr) I keep coming up with the same problem.

If I use the following urls I get the following results:

window.onload = function() {
tf.ajaxReq('http://tablefilter.free.fr/group1.htm',tf.content );
}

   -> Works in internet explorer, but not in firefox.

window.onload = function() {
tf.ajaxReq('group1.htm',tf.content );
}

   -> Works in firefox, but not in internet explorer.

Then, after I spent a while checking everything, and uploading it to the server, I can get it work both relatively AND using the same full domain URL with success, but only in Firefox. The table does not load in IE. When debugging in IE6, it says 'tf is undefined' in regards to the 'var tf = new TFC();' javascript line.

I apologise for yet another Ajax question, but any help would be greatly appreciated. I've emailed you a zip containing my downloaded files and a link to my test page if you can see anything wrong with them.

Thanks a lot Max, (this is the LAST question!)

Dan

Email : dangarfielduk AT hotmail DOT com


1 Reply

1 . 2009-10-27 14:12:33

aa wrote:

Post your comment here...dd

Email :


Top of page

214 . 2009-10-21 12:35:00

mar wrote:

Hi,

how can i get  col header rows of table like 'GetTableData ()"?

thanks

Email :


1 Reply

1 . 2009-10-23 18:54:47

Max wrote:

Hi mar,

the GetTableData method returns only data and not the col headers. If you need to get the col headers you can do it via the DOM (document.getElementById('mytableId').rows[0].cells[0].innerHTML) or by using the TF object (myTF.tbl.rows[myTF.GetHeadersRowIndex()].cells[0].innerHTML)

Email :


Top of page

215 . 2009-10-20 08:23:23

Refresh_filters wrote:

Hi Max,

Can I use refresh_filters only on specific column?

I want to set refresh_filters only for one of much combo boxes!

 

Cheers

Email : dragonlord888 AT hotmail DOT com


2 Replies

1 . 2010-04-30 18:08:58

Cheesedude wrote:

I'm using version 1.7.  It does pretty much everything I need.  One suggestion about refresh_filters:

It would be nice if drop down boxes with existing filters on were not refreshed.  When filtering on Column 1 then filtering on Column 2, the Column 1 drop down box is reset to the text value of "display_all_text".  It would be nice if the value of the drop down remained on the filter value.  Basically, like how Microsoft Excel does it. 

Thanks! :)

Email : cheesedude2006 AT yahoo DOT com


2 . 2009-10-20 13:54:44

Max wrote:

This is not possible at the moment.

Email :


Top of page

216 . 2009-10-19 10:51:48

maj wrote:

hi;

i have a problem with using the operation myTF.GetFilteredData();

i have this error "

Object doesn't support this property or method";

thanks

Email :


2 Replies

1 . 2009-10-21 14:40:24

maj wrote:

thanks alot max;

Email :


2 . 2009-10-20 13:52:39

Max wrote:

Maj, make sure that your TF object is called 'myTF'. If you use the setFilterGrid method to generate the filters then the name of your TF object is 'tf_'+idOfYourTable as explained in:
http://tablefilter.free.fr/doc_class.php#constructor

Email :


Top of page

217 . 2009-10-17 01:09:06

rfried wrote:

Hello,

This code has been a Godsend for me!  It has definitely reduced my development time since I'm no expert at HTML and javascript. 

I'm in need of an improvement to the column visibility extension. I'm currently using the table code to sort a query from a live database. Everytime I refresh the page I get a few more records to evaluate. Unfortunately page refreshing loses all the column visibility selections.  I'm hoping for some functionality similar to "remember_page_number: true" for the column extension.

If you have time will you please provide some guidance?

Thanks,

RFried

Email : ryan DOT friedman AT ni DOT com


1 Reply

1 . 2009-10-20 13:49:30

Max wrote:

Rfried,

I confirm there no such a feature at the moment. I have planned to work on this extension in the coming weeks hopefully.

Email :


Top of page

218 . 2009-10-16 20:00:21

shyam wrote:

hi Thanks for providing a great kit. it is wonderful.

I was looking whether we have a option of disabling sorting on certain columns. i could not find it the documentation either.

Can u help.

Thanks

Shyam

 

Email : spkunta AT gmail DOT com


1 Reply

1 . 2009-10-20 13:46:44

Max wrote:

Shyam,

yes, you can disable the sorting on a column. Have a look to
http://tablefilter.free.fr/doc.php#grid_sort
you will see in the sort_config property object that sort_types property accepts the 'None' value. Also have a look to the code of the same page http://tablefilter.free.fr/doc.php that contains a working example of columns with sorting disabled

Email :


Top of page

219 . 2009-10-16 09:43:11

Frank wrote:

Hi, first of all thanks for providing this great script. I'm currently using it and saving a lot of time with it.

One question: I have added a column with checkboxes in my table to enable a user to select certain items and do stuff with them. I run a little Javascript function "check all" to select/unselect all items with on click:

<script type="text/javascript">
function select_all(status) {
   for (i=0;i<document.meinform.length;i++) {
    if(document.meinform.elements[i].name=="daten[]") document.meinform.elements[i].checked = status;
   }
  }
</script>

However, this always checks ALL items, regardless of the filter being set, which is not expected. I understand this behaviour as obviously filtering the table doesn't exclude the items from thje form (which spans the entire table), but how can I exclude the hidden items not being part of the filter result?

Is there a property or something which I can check in the Javascript?

 

Thanks,

Frank

Email : frank DOT dux AT gmx DOT de


5 Replies

1 . 2010-05-20 04:51:43

XYZ wrote:

<script type="text/javascript">
function select_all(status) {
   for (i=0;i<document.meinform.length;i++) {
    if((document.meinform.elements[i].name=="daten[]") || (document.meinform.elements[i].offsetWidth != "0"))   document.meinform.elements[i].checked = status;
   }
  }
</script>

Email :


2 . 2010-03-31 05:15:07

Kusai wrote:

I am trying to do the same thing Frank is trying to do, but I am still not sure how it is done!

 

Where do we place this code:

var trO = document.meinform.elements[i].parentNode.parentNode;
//alert(document.meinform.elements[i].parentNode.parentNode.nodeName); //check if this is the TR element
if(document.meinform.elements[i].name=="daten[]" && trO.style.display!='none') document.meinform.elements[i].checked = status;

 

is it going to be inside our table or outside?  do we keep the first <td> we had for the check marks, or this code is supposed to replace that?

Thanks alot,

Kusai

Email : kazarrugh AT gmail DOT com


3 . 2009-10-20 19:12:33

Max wrote:

Good, now it is clear. What you need to do is try to get the row element (<tr>) by using the parentNode property and then test its display property. Your code should look like this:
...
var trO = document.meinform.elements[i].parentNode.parentNode;
//alert(document.meinform.elements[i].parentNode.parentNode.nodeName); //check if this is the TR element
if(document.meinform.elements[i].name=="daten[]" && trO.style.display!='none') document.meinform.elements[i].checked = status;
...

Uncomment the alert to check if the node is actually the row element. First parent should be the TD and the second the TR. Of course, this is the case if your check element is not contained in a span, div or whatever.

Email :


4 . 2009-10-20 15:22:23

Frank wrote:

Okay, let me try to explain it more clearly:

1) I have a table with filters; each row contains a checkbox. It's embedded in a form.

2) I use one of the filters; only filtered rows are displayed.

3) I now want to set all checkboxes of the current (filtered) view at once.

4) Then I want to submit the form and analyse on the server for which rows the checkbox was checked.

I used the above-mentioned Javascript function for this. However, this doesn't work, because it in step 3) it always sets the checkboxes for ALL rows, regardless if they are currently displayed (i.e. in the filter result) or not.

 

Question: How can I create a javascript-function that sets only the checkboxes of the rows which are currently visible?

The custom_cell_data event doesn't help here (or maybe I don't understand it), because I want to SET values, not GET values.

 

Thanks,

Frank

Email : frank DOT dux AT gmx DOT de


5 . 2009-10-20 13:36:15

Max wrote:

Frank, I don't fully understand your question. I don't have much time left for this. In any case, have a look to this example though I am not sure is related to your question:
http://tablefilter.free.fr/custom-data.htm

Email : tablefilter AT free DOT fr


Top of page

220 . 2009-10-14 16:45:59

maj wrote:

hi MAX,

How I can add a new function like "SUM"and"mean" for col_operation .

cheers

Email : majdi_sfaxi AT hotmail DOT com


1 Reply

1 . 2009-10-14 17:42:11

Dan Garfield wrote:

Hi mate,

I think everything you really need to know about it with examples of it in action are here:

http://tablefilter.free.fr/ex.php#tbl7

http://tablefilter.free.fr/col-ops.htm

Also, more info for the col_operation function scroll down to the filter grib bar behavoiurs on this page:

http://tablefilter.free.fr/doc.php#grid_behave

Hopefully that will be all the information you need.

 

Thanks,

Dan

Email :


Top of page

221 . 2009-10-09 14:44:15

Two tables one search engine wrote:

Hi Max,

I have two tables with same data, can i filter both table when i filter first table?

 

Cheers

Email : dragonlord888 AT hotmail DOT com


2 Replies

1 . 2009-10-14 10:26:23

Example... wrote:

Can you explain on some example?

Email : dragonlord888 AT hotmail DOT com


2 . 2009-10-12 14:01:01

Max wrote:

Yes, you just need to use the on_after_filter event to do so. Once the first table is filtered you will use this event in order to set the filters values in the second table and then filter it:
...
on_after_filter: function(o){ mySecondTableTFObj.setFilterValue(0,'searched term here'); mySecondTableTFObj.Filter();   }
...

Email :


Top of page

222 . 2009-10-09 10:27:33

Dan Garfield wrote:

Hi Max,

I'm just trying to condense and remotely load a few tables with Ajax, the problem being, I can seem to load tables with a relative pathway very happily, but not with a remote http url. This becomes a problem because I use a CMS compiler to construct the page which doesn't really work unless there are some redirect php functions.

Example:

window.onload = function() {
//tf.ajaxReq('
http://www.blahblah.com/Library/Assets/Matrix/matrix-table/matrix-table.htm',tf.content);
  tf.ajaxReq('blah/matrix-table.htm',tf.content);
}

 

I can use 'myfolder/matrix-shavers.htm' links etc, but for some reason the full URL won't work. Is there a syntax or Ajax variable that calls the URL parent directory and the file name seperately, ie.

window.onload = function() {
var ajaxurl = 'http://www.blahblah.com/Library/Assets/Matrix/matrix-table/'
var ajaxfile = matrix-table.htm
  tf.ajaxReq(ajaxurl,ajaxfile,tf.content);
}

I know the above function is wrong, but to be honest, I haven't really dealt with Ajax before, I'm just presuming that there is some way of calling a http'd file.

I'd be more than happy to show you the finished product when it's done.


Thanks,

Dan

 

 

Email : dangarfielduk AT hotmail DOT com


1 Reply

1 . 2009-10-15 13:32:43

Max wrote:

Hi Dan,

if the domain is the same there shouldn't be any problem. In the second function, I presume you mean:
tf.ajaxReq(ajaxurl+ajaxfile,tf.content);
In any case, there is no such variable calling parent directory in the Ajax expample provided on this site.
You just combine your url and then you pass it to the ajaxReq method as first parameter tf.ajaxReq(myAjaxurl,tf.content);

Email :


Top of page

223 . 2009-10-09 10:13:30

Michael wrote:

Hi Max,

first off, great script. I've been using it for a couple of weeks and doing some great things with it.

However, I've run into a problem that I was wondering if you had any thoughts on

I have three tables that are basically the same structure but within tabs. I have tried putting the filter within the tabs and to reference the tables in question (each has its own class) but don't seem to be able to get it to work. By not working what i mean is that the filter lists don't populate so I'm assuming they are not picking up the code.

I have tried doing the following

Script

have multiple scripts load and then multiple filters, one for each tab

- change table_Props to table0_Props, table1_Props etc. and then

- change the grid ids to have a number and therefore be unique

- change the div in the last line of the script

Filter HTML

- Make correspnding changes from above

The one element that I think may be causing the issue is <div id="extGrid"> does this have to be exactly called this for the code to work or can it be altered?

Anyway, any thoughts on how to get a filter within jQuery UI tabs to work would be fantastic

cheers

Michael

 

Email : michael AT moulsdale DOT com


1 Reply

1 . 2009-10-15 18:40:07

Max wrote:

Michael,

I am not familiar with the jQuery library. The only advice I can give you is to make sure that the table exists when the setFilterGrid method is called or the TF is instanciated. From what I understand you use external grids for your tables, if this is the case, make sure that the grid containers have a unique id (<div id="extGrid01" ... <div id="extGrid02" etc...)

Email :


Top of page

224 . 2009-10-02 10:37:08

Filters Row Visibility Manager doesn't work well wrote:

This doesn't work well, because when you check some column that column hide!

I want when i check that column will show and when i uncheck that column will hide!

Also, is normal that you give column that you want to show not to hide!

It's my opinion

Cheers

Email : dragonlord888 AT hotmail DOT com


2 Replies

1 . 2009-10-06 13:43:58

Max wrote:

It works well! You just don't find it logic... In any case this will be corrected on the next version of this extension. I still don't know when exactly but in the coming weeks.

Email :


2 . 2009-10-05 15:23:36

DragonLord888 wrote:

Can anybody help me about this?

Just give me some instruction for this class!

Email : dragonlord888 AT hotmail DOT com


Top of page

225 . 2009-10-01 20:10:51

Leitrim wrote:

Hi, excellent script and really looking forward to fully implementing it, however I've just starting using it but seeing some odd behavour, and baffled as to what I'm doing wrong..

I load the table via ajax after the user has clicked on a link which calls the function below

   function popCustDetails(cust)
   {
    document.getElementById('selectedcust').value = cust; //set customer id into hidden field
    AjaxCall('populatecust', 'custdetails'); // read database and insert table into span defined by custdetails
    
    var cusacc_Props =  {                     
                    col_0: "none",
                    col_1: "select", 
                    col_2: "none",
                    col_3: "none",
                    col_4: "none",  
                    col_5: "none",
                    display_all_text: " [ Show all ] ",
                    alternate_rows:true,  
                    sort_select: true 
                };   
       
      // alert("ok");
       setFilterGrid("customeraccbox", cusacc_Props);   //filter table
   }

With this code nothing happens, i.e. no filters appear. However when I put in the javascript alert, it does work.. its like I have the pause the program to get it to filter.

Is there a different way to call this when loading the table through AJAX?

 

thanks for your help..

 

any ideas??

 

Email : info AT varoom DOT ie


1 Reply

1 . 2009-10-02 13:30:50

Max wrote:

Hi Leitrim,

make sure that the table exists before you invoke the setFilterGrid method. Please have a look to the AJAX demo:
http://tablefilter.free.fr/ajaxdemo.htm . The setFilterGrid is called once the AJAX request is completed (onComplete callback)

 

Email :


Top of page

226 . 2009-10-01 14:30:55

molto bello! wrote:

mi piace programmare in php e utilizzo il framework codeigniter. Devo tutto questo mi è molto utile. Grazzzzie. Diego

Email : rollettino AT inwind DOT it


0 Reply

Top of page

227 . 2009-09-25 01:19:56

nullp0inter wrote:

Max, it seems like the refresh_filters: true is a bit buggy. when I hit clear..a couple columns do not refresh. the table will show every category, but the checkboxes do not update

Email :


5 Replies

1 . 2009-09-26 17:45:19

Max wrote:

Don't understand you ?!?!!!!

Test your config object with the http://tablefilter.free.fr/datademo.htm demo page, just copy it locally on your pc and replace its config object with yours. If you reproduce the same behaviour with this example send me an email with a clear explanation on how to reproduce the bug and attached the datademo.htm page with your config object.

Thanks in advance, this will avoid a lot of comments and reduce misunderstanding.

Email : tablefilter AT free DOT fr


2 . 2009-09-26 17:11:02

nullp0inter wrote:

hmm that didn't seem to work. its strange because only the one column doesnt get updated. its the 1th column, with 0 being the first, it just wont update.

Email :


3 . 2009-09-26 13:21:24

Max wrote:

I managed to reproduce the bug. To correct this, you just need to make a small change to the _ClearFilters method (line 3611) in the tablefilter.js document:

replace if(this.refreshFilters) this.RefreshFiltersGrid(); (line 3619) with

if(this.refreshFilters){
    this.activeFilterId = '';   
    this.RefreshFiltersGrid();
}

This should fix the incorrect behaviour.

Email :


4 . 2009-09-25 20:51:06

nullp0inter wrote:

Yes the 'checklist' filter. And yes I am using 1.9.5. It seems like just one of my columns does not refresh correctly.

Email :


5 . 2009-09-25 13:30:18

Max wrote:

Do you mean the 'checklist' type filters? Do you use the last version (1.9.5)?

Email :


Top of page

228 . 2009-09-21 16:55:15

Disk0Sisk0 wrote:

Hi Max, well done on the excellent script, it really saved me alot of time.

The fixed width function is great. Any tips for printing out the tables on pages without using the paging feature?

Email : noj505 AT gmail DOT com


3 Replies

1 . 2009-10-01 15:43:27

Disk0Sisk0 wrote:

I figured it out...

The overflows that are added by the filtergrid.js script to the table were causing the table to be clipped at the end. I added the values that get added to the table by the script to the style sheet and commented them out from the js and now the table continues onto the next page.

 

Cheers for the help tho...

 

Email : noj505 AT gmail DOT com


2 . 2009-09-28 16:03:32

Disk0Sisk0 wrote:

Hi again Max,

Cheers for the reply. I'll be a bit more specifc. What I want to achieve is as follows, the table to be printed is very large. When in print mode, (ie. print preview), it jumps to the next page as it is trying to avoid the page break.

This crops some of the rows at the end of the table. Is there a way of getting them to migrate onto the next page?? At the moment they are just hidden. I did try and use the page-break-after property after 10 rows say, but after the first 10 the rest don't even appear.

I am at a loss. Any ideas would be greatly appreciated.

Email : noj505 AT gmail DOT com


3 . 2009-09-25 13:26:15

Max wrote:

Hi Disk0Sisk0, what you can try to do is to remove programmatically the paging just before the printing and then reapply the paging feature.

Email :


Top of page

229 . 2009-09-19 09:15:21

nullp0inter wrote:

so i  looked over the 'generating a csv' code below, and realized that activex does NOT work with firefox. here's an AJAX solution for everyone that needs to generate a CSV from the filtered data

 

function WriteToFile() {

    //alert( tf_demo.GetFilteredData() ); //for testing
    var csvArray = tf_demo.GetFilteredData();
    var csvArray = csvArray.join('|'); //use a different delimiter since the array uses commas

    var http = new XMLHttpRequest();

    var url = "http://xxxxxxxx.com/create_csv.php";
    var params = "data="+csvArray;
    http.open("POST", url, true);

    http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    http.setRequestHeader("Content-length", params.length);
    http.setRequestHeader("Connection", "close");

    http.onreadystatechange = function() {
     if(http.readyState == 4 && http.status == 200) {
        var fileLink = http.responseText;
                fileLink = ''+fileLink;
                document.getElementById('dlink').href= fileLink;
                document.getElementById('dlink').style.visibility = "visible";

     }
    }
    http.send(params);

}

 

'dlink' is a link on my page that starts off with visibility: hidden. Use your own PHP script to parse the array and write a csv file to your server. Then have the script echo back a link to the newly created file.

Email :


2 Replies

1 . 2010-08-31 10:37:53

ludodo wrote:

Hi,

I'm trying to use your script because I also need to export as CSV.

Could you show how you call your javascript function "writetofile"  from your HTML page (or php script) and the php script that parse the array called by the javascript function ?

I don't manage to make this working Embarassed

Thank's a lot

 

 

Email : ludolestrat AT yahoo DOT fr


2 . 2009-09-19 12:39:44

Max wrote:

Thanks nullp0inter for this useful contribution.

Email :


Top of page

230 . 2009-09-17 19:01:56

nullp0inter wrote:

the multiple select box does not load in internet explorer

Email :


1 Reply

1 . 2009-09-19 12:37:49

Max wrote:

Please be more precise.

Email :


Top of page

231 . 2009-09-17 07:04:13

Bruuno wrote:

Is it possible to have a table/filteroption start out with no results?

 

I would like the http://tablefilter.free.fr/external-grid.htm to display none at start in stead of display all

 

I am allmost sure this has to be a possibillity

Email : arco AT arcowolf DOT com


2 Replies

1 . 2009-09-22 10:11:45

Bruuno wrote:

can you please tell me where I should put this code, I am not a coder

Email : arco AT arcowolf DOT com


2 . 2009-09-19 12:30:16

Max wrote:

Hi Bruuno,

there is no such an option, however you can achieve that quite easily. If your table has no tbody defined, add a thead and tbody section to it and then set the tbody display style to none (<tbody style="display:none;">). Once you have done so add a on_after_filter property (event fired just after table is filtered) to your configuration object:
...
on_after_filter: function(o){
    o.tbl.tBodies[0].style.display = '';
},
...

Of course, this will show the tbody everytime you filter the table. Just improve this function to make it work only the 1st time the table is filtered with a boolean for example.

Email : tablefilter AT free DOT fr


Top of page

232 . 2009-09-17 06:26:35

nullp0inter wrote:

GetFilteredData(0 is clearly defined in tablefilter.js however when I call it, I get a function not defined error in FF3. Anyone else see this?

Email :


1 Reply

1 . 2009-09-19 12:32:16

Max wrote:

Please be more precise.

Email :


Top of page

233 . 2009-09-16 20:46:26

Kimberlee wrote:

Hi Max.  The code has been working wonderfully--thank you so much for making this available.  I have a question regarding filtering displayed data.  If a user filters on a particular column, is there a way to have the remaining filters only show options available in the data that meets the previously selected criteria?  Example:  If a user sorts on STATE = NY (below), the only options that show in the CITY filter are those where STATE = NY.

NAME                 CITY              STATE

Kim                   New York        NY

Barb                  New York        NY

Anne                 Albany           NY

Tom                  Buffalo          NY

Max                  Burlington      VT

Joe                   Manchester    VT

 

Thank you for your time.

 

K

Email : kcroumie AT pcconnection DOT com


2 Replies

1 . 2009-09-22 21:15:37

Kimberlee wrote:

Ah, my apologies.  I did look through the documentation and completely missed that.  Thank you!

Email :


2 . 2009-09-18 09:08:58

Max wrote:

Hi Kimberlee,

add the refresh_filters property to your config object (... refresh_filters:true ...) to activate this behaviour. Also check the doc page http://tablefilter.free.fr/doc.php#grid_behave and the example #10 in the examples page http://tablefilter.free.fr/ex.php#tbl10

Email :


Top of page

234 . 2009-09-15 22:14:13

nullp0inter wrote:

I keep getting an error when I try to sort any column besides the first one

Error: c is undefined
Source File: http://securepanel.all-inbox.com/media/sortabletable.js
Line: 311

 

Here is my declaration:

<script language="javascript" type="text/javascript">
//<![CDATA[   
    var props = {
        sort: true,
        alternate_rows: true,
        rows_counter: true,
        rows_counter_text: "Displayed Rows: ",
        loader: true,
        loader_html: '<img src="media/load.gif" alt="Loading..." style="vertical-align:middle; margin-right:5px;" />Loading...',
        status: true,
        status_bar: true,
        sort_config: {
            sort_types:['String', 'String', 'String', 'String', 'String', 'US', 'US', 'US', 'US','US', 'US', 'US', 'US','US', 'US', 'US', 'US']
        },
        btn_reset: true,
        btn_reset_text: "Clear",
        display_all_text: " [ Show All ] ",
        status_bar_target_id: 'statusDiv',
        col_0: "multiple",
        col_1: "checklist",
        col_2: "checklist",
        col_3: "checklist",
        external_flt_grid: true,
        external_flt_grid_ids: ['slcCountry','slcCode','slcYear','inpPop'],
        odd_row_css_class: "lowlite",
        refresh_filters: true,
        msg_sort: 'Sorting...',
        on_change: false,
        highlight_css_class: "hilite"
    }
    setFilterGrid("demo",props);
//]]>
</script>

Email : abazoskib AT gmail DOT com


0 Reply

Top of page

235 . 2009-09-14 11:50:51

Tom wrote:

Is there a possibility for this great script to include a filtertype of boolean? So a simple Yes/No filter.

It is at this moment the only filtertype I am missing. (lacking any knowledge to create one myself...)

Email :


2 Replies

1 . 2009-10-06 12:27:22

Tom wrote:

Thanks for the advise. I will check if I can achieve this by using the external filter.

Email :


2 . 2009-09-15 21:56:23

Max wrote:

Tom,

there is no such a filter type at the moment. What you can do is to implement external filters to do so (external_flt_grid: true) - http://tablefilter.free.fr/external-grid.htm -, set the filter on the column where you are supposed to place the boolean filter to none (col_n: none), place your boolean filter (<input name="boolInp" type="checkbox" value="true"/>true <input name="boolInp" type="checkbox" value="false"/>false) in desired place in the page and and use a onclick event to set the value in the hidden filter with the SetFilterValue( index, searcharg ) method.

I hope this will help you, I will try to post an example in the next days Smile

Email :


Top of page

236 . 2009-09-11 12:08:38

Dan Garfield wrote:

Hi Max,

Another question I'm afriad, similar to the previous paging issue.

When you set 'refresh_filters' to 'true', it only refreshes the filters with the possible options on that 'page' rather than the whole of the table.

Does that make sense, I had another tinker with the tfAdapter file, but you are much better than I am, and I can't seem to make it work.

Thanks for any help on this.

Dan

Email : dangarfielduk AT hotmail DOT com


1 Reply

1 . 2009-09-13 17:57:02

Max wrote:

Hi Dan,

I am afraid your remark does make sense... This time you need to edit the tablefilter.js file, as the so called refresh behavior belongs to the core script. Follow the steps below, finally only 2 lines need to be changed:

  1. Locate the _PopulateSelect method and more precisely the following lines:
    ...
    if((colIndex==j && !isRefreshed) ||
          (colIndex==j && isRefreshed && ((row[k].style.display == '' && !this.paging) ||
           ( this.paging && ((activeFlt==undefined || activeFlt==colIndex) || (activeFlt!=colIndex && row[k].style.display == ''))) )))

    ...

    replace the above if statement with the following:
    ...
    if((colIndex==j && !isRefreshed) ||
          (colIndex==j && isRefreshed && ((row[k].style.display == '' && !this.paging) ||
          ( this.paging && (!this.validRowsIndex || (this.validRowsIndex && this.validRowsIndex.tf_Has(k)))
           && ((activeFlt==undefined || activeFlt==colIndex)  || (activeFlt!=colIndex && this.validRowsIndex.tf_Has(k) ))) )))

    ...
  2. Locate the _PopulateCheckList method and similarly to above:
    ...
    if((colIndex==j && !this.refreshFilters) ||
         (colIndex==j && this.refreshFilters && ((row[k].style.display == '' && !this.paging) ||
          ( this.paging && ((activeFlt==undefined || activeFlt==colIndex ) ||(activeFlt!=colIndex && row[k].style.display == '')) ))))

    ...

    replace the above if statement with the following:
    ...
    if((colIndex==j && !this.refreshFilters) ||
          (colIndex==j && this.refreshFilters && ((row[k].style.display == '' && !this.paging) ||
          ( this.paging && ((activeFlt==undefined || activeFlt==colIndex ) ||(activeFlt!=colIndex && this.validRowsIndex.tf_Has(k))) ))))

    ...

Those changes will be available in the next release, hopefully I will post it tonight or in the coming days Smile

Email :


Top of page

237 . 2009-09-11 07:04:59

Parin wrote:

Hi,

This is indeed a great script. My work has reduced to a greater extent by using this script.

But the only problem i am facing is how to handle the width of the individual columns.

If you can help me with this i will be very delighted...

Thanks again...

Email : parindagade AT rediffmail DOT com


1 Reply

1 . 2009-09-11 11:43:59

Dan Garfield wrote:

Seeing as I'm just about to ask another question, I might as well make myself used and answer one, although, all credit is always to Max for the script.

 

Parin, in the table header <thead> section, just create table headers and define them with a width:

<thead>
<tr>
    <th width="7.77%" align="middle">Image</th>
    <th width="7.77%" align="middle">Brand</th>
    <th width="19.92%" align="middle">Model</th>
    <th width="6.89%" align="middle">Price</th>
    <th width="6.89%" align="middle">Type</th>
    <th width="6.89%" align="middle">Weight</th>
    <th width="6.89%" align="middle">Seat<br />Pos.</th>
    <th width="6.89%" align="middle">Age</th>
    <th width="16.29%" align="middle">Included</th>
    <th width="6.89%" align="middle">Folded<br />Size</th>
    <th width="6.89%" align="left">Buy<br />Now</th>
</tr>
</thead>

It appears as though some people are having problems with this, IE performs slightly different to Firefox in terms of the table overflow, but if the worst comes to the worsyt, use pixels instead of percentages.

Hope this helps,

Dan

Email : dangarfielduk AT hotmail DOT com


Top of page

238 . 2009-09-10 20:50:43

Laura wrote:

First off, I want to thank you for this great piece of code...just starting using it today, and it was very easy to get up and running with it.

I have one question about the widths of the filter boxes. I have my table set up with specific % sizes for columns with number columns having much less width than the other columns. I set this up the thead elements. I want to be able to control the size of the text boxes for the filtering, and it does not seem to be working. Here is my table:

<table border="0" cellpadding="4" cellspacing='0' width="100%" class='tablesorter' id='account'>
               
                <thead>
               
                    <tr>
                        <th width='10%'>                                Enabled</th>    
                        <th style='text-align: center;' width='20%'  > Account Name</th>
                        <th style='text-align: center;' width='20%'   > Account Type </th>
                        <th style='text-align: center;' width='10%'  > Max <br/> Users</th>
                        <th style='text-align: center;' width='10%'  > Max <br/>Sessions</th>
                        <th style='text-align: center;' width='10%'  > Start Date</th>
                        <th style='text-align: center;' width='10%'  > Expires</th>
                        <th style='text-align: center;' width='10%'  > Last Changed</th>
                    </tr>

                </thead>
                <tbody>
                    <?php echo $tablerows; ?>
                </tbody>
            </table>

 

And here is the javascript to call the filtergrid: (I am also using the tablesorter and with it and without it, does not matter)

 <script language="javascript" type="text/javascript">
                 $(document).ready(function() {
            $("#account").tablesorter({widthFixed: true, widgets: ['zebra']});
        });
                //<![CDATA[
                var tConfig={   
                         col_0:"select",
                         col_2:"select",
                        col_width:["5%","20%","10%","5%","5%","10%","10%","10%"],                
                        custom_slc_options: {cols:[0],
                                             texts:[['On','Off']],
                                             values:[['checked','unchecked']],
                                             sorts: [false]
                                             },
                        display_all_text: " [ Show all ] "  ,
                                                            
                           paging:true,
                        paging_length:25,
                        results_per_page:['Results per page',[25,50,100]],
                        btn_reset: true, 
                        btn_reset_text: "Clear", 
                        loader: true,
                        alternate_rows:true
                                       
                        
                    }
                //]]>
                  setFilterGrid("account",tConfig);         
            </script>

 

Even if I change the col_widths to actual px values, it always defaults to the same widths and they are too wide to fit in my table.

 

Email :


3 Replies

1 . 2009-09-12 10:31:29

Max wrote:

Laura,

it seems to me the stylesheet filtergrid.css is not loaded in head section of your page. An advice, please refer to the examples, demo pages and documentation of this website, you will find a lot of info and answers to your questions Wink

Email :


2 . 2009-09-12 00:29:42

Laura wrote:

Thanks Max...that is what I was playing around with yesterday before posting my question. I did change the width of the .flt to different %s and px's and nothing makes a difference. I did take this code over from someone else(without your script) and added the script to it. He is using blueprint to set up alot of stuff and I never used it and am just learning. No matter what I changed the .flt width to, it always stays the same. I even changed the widths in my thead to this:

 

<thead>
               
                    <tr>
                        <th width='45px'>                                Enabled</th>    
                        <th style='text-align: center;' width='100px'  > Account Name</th>
                        <th style='text-align: center;' width='80px'   > Account Type </th>
                        <th style='text-align: center;' width='40px'  > Max <br/> Users</th>
                        <th style='text-align: center;' width='40px'  > Max <br/>Sessions</th>
                        <th style='text-align: center;' width='70px'  > Start Date</th>
                        <th style='text-align: center;' width='70px'  > Expires</th>
                        <th style='text-align: center;' width='70px'  > Last Changed</th>
                    </tr>

                </thead>
                <tbody>
                    <?php echo $tablerows; ?>
                </tbody>
            </table>
       
          <script language="javascript" type="text/javascript">
                 $(document).ready(function() {
                      $("#account").tablesorter({widthFixed: true, widgets: ['zebra']});
                });
                //<![CDATA[
                var tConfig={   
                         col_0:"none",
                         col_2:"select",
                         col_3:"none",
                         col_4:"none",
                         col_widths:["45px","100px","80px","40px","40px","70px","70px","70px"],
                         
                         
                            
                         
                         
                        display_all_text: " [ Show all ] "  ,                                                             
                           paging:true,
                        paging_length:25,
                        alternate_rows:true ,
                       
                        loader: true,
                       
                        loader_html: '<div id="lblMsg"></div>',
        loader_css_class: 'myLoader',
        status_bar: true,
        status_bar_text: 'Processing: ',
        status_bar_target_id: 'lblMsg',
        status_bar_css_class: 'myStatus',
       
        rows_counter: true,
        rows_counter_text: "Displayed rows: ",
        btn_reset: true,
        btn_reset_text: "Clear Filters"


 ......

 

 

And the columns with the textboxes all come out the same width no matter what....

 

Another problem I am encountering is that for the status_bar, my pagination info, clear button and num of records are all left justified and the clear button I see in all the demos is right justified. How can I get the clear button right justified?

 

Thanks

Email : lgrella at gmail dot com


3 . 2009-09-11 23:15:56

Max wrote:

Lisa,

if you need to change the filters size, just edit the .flt class in the filtergrid.css stylesheet. The width is set to 100%, just change it at your convenience.

Email :


Top of page

239 . 2009-09-09 21:14:16

Dan Wheeler wrote:

Great Script.

Is there any way to use the column selects and have them search OR instead of AND?

 

I can do it with the gle_search_filter and the or_operator, but I need the same thing to happen using the selects at the top of each column.

 

Thanks in adavance

Email : dwheeler AT rep-am DOT com


1 Reply

1 . 2009-09-10 17:24:55

Max wrote:

Dan,

have you tried the custom selects (custom_slc_options property)?

Check the doc: http://tablefilter.free.fr/doc.php#grid_drops and this demo: http://tablefilter.free.fr/datademo.htm

Email :


Top of page

240 . 2009-09-09 15:50:45

Menoblack wrote:

First of all: Wonderfull script, very usefull.

 

I miss 2 options: I'd like to sort tables in random order (eg. a column with mini,small,medium,large,huge sorted in that order) and second, a setting to automaticly select a drop down menu after filtering on it, so you can easily switch with just the keyboard. (not needing to press enter after selecting even would make that better!)

 

Keep up the good work!

Email : menoblack AT gmail DOT com


0 Reply

Top of page

241 . 2009-08-26 17:25:49

Dan Garfield wrote:

Hi Max,

Great code, simply amazing.

Just got a quick query about paging and sorting.

I'm trying to sort the whole table whilst paged, yet when I sort, it only sorts the values that are on that 'page' rather than the whole table. Is there a way to amend this, or is it a case of adding functions to remove and re-add paging before and after the sort function (i.e on_before_filter). I hope that makes sense.

Any help would be greatly appreciated!

Thanks,
Dan

Email : dangarfielduk AT hotmail DOT com


7 Replies

1 . 2009-09-10 17:20:47

Max wrote:

What I suggested here is a just a work-around. Of course, in the next release this will be a property of the sort extension config object Smile

Email :


2 . 2009-09-10 15:32:35

Fahim wrote:

This worked like a charm!!! Thanks Max.

As a suggestion for your next release regarding this. Why don't you make the re-set page parameter accept a page value (default =1).

That way the script is even more flexible and will help with situation where you need to display the results of the last page after sort or in-between.

Thanks for the quick response.

Fahim

Email : fahimsalim AT hotmail DOT com


3 . 2009-09-10 13:52:41

Max wrote:

I will add the parameter to re-set page 1 after sorting while pagination is enabled in the next release of the sort module.
Until then, you just need to make a quick change in the tfAdapter.sortabletable.js file:

  1. locate the this.st.onsort event (ln 219)
  2. go to the if(isTFPaged){...} block
  3. replace the o.SetPage(o.currentPageNb); line with o.SetPage(1);

This should be enough. Let me know if it worked.

Email :


4 . 2009-09-08 14:37:19

Fahim wrote:

Hi Max,

A fantastic script and I have especially been waiting for the paging and sorting features to work correctly side by side.

However, I've noticed something.

When you paginate to a page and then sort on a column, the page number should reset to 1 (ie go back to start).

Currently the page counter stays as it is and shows you the sorted data at x page - which in soem cases is not useful.

Is there a work around or could you add an additonal parameter to force the pagination to go back to 1 after a sort?

 

------

by the way, this script is much better than the Yahoo Yui Datatable - much easier to use :oP

Email : fahimsalim AT hotmail DOT com


5 . 2009-09-02 17:34:08

Dan Garfield wrote:

Thanks Max, I too created a modified version, but yours was a lot cleaner and simpler version. I'm beginning to become a big fan of the this script, I find myself saying, hey, we could have a table in to pretty much everyone I meet...

Thanks again,

Dan

Email : dangarfielduk AT hotmail DOT com


6 . 2009-08-30 20:31:51

Max wrote:

Dan,

I have updated the Sortable Table extension, now when the table is paged the sorting feature sorts the whole table rather than the current page. To upgrade the extension, just go the download page and download the Sortable Table extension v1.1.

Email : tablefilter AT free DOT fr


7 . 2009-08-27 16:34:45

Max wrote:

Hi Dan,

your remark makes sense, you are right. Actually, I am aware about that and hopefully this will be fixed on the next release of the sort extension. Moreover, I haven't tried to fix this by playing with some events (on_before_filter as you suggest). I will try to check this in the next days whenever I have some free time... Frown

Email :


Top of page

242 . 2009-08-24 17:44:49

Michael wrote:

Hi, just trying out your very impressive script now.

Is there a way to get the value of check boxes which are contained in a row?

Just say I apply a filter, and of the remaining items I tick 2 check boxes, could I use something like GetFilteredDataCol to return these?

Email : mconnors AT campus DOT ie


1 Reply

1 . 2009-08-25 14:12:32

Michael wrote:

I hacked in a new function to do what I need.

Thanks,

Michael

Email : mconnors AT campus DOT ie


Top of page

243 . 2009-08-19 18:50:01

Doc wrote:

The functionality of your code is just what I am looking for with respect to filtering.  I have added it to my PHP code, but can't seem to get the function to work.  Below are related areas to the code without some of the sql and variable/condition setting details.  Any assistance would be greatly appreciated.

 

 

<head>
<script type="text/javascript" src="js/TableFilter_EN/tablefilter.js"></script>

</head>

<body>
<div><?php
$result---- results of database query
$col%----- variables set to databasefields

if ($result) {
    
    echo "<table id='mtable01' width=500px align=center border=8 bordercolor=gray><tr>
    <td align=center bgcolor=$xbgrnd ><font color=$hfont><strong>Hcol1</strong></font></td>
    <td align=center bgcolor=$xbgrnd><font color=$hfont><strong>Hcol2</strong></font></td>
    <td align=center bgcolor=$xbgrnd><font color=$hfont><strong>Hcol3</strong></font></td>
    <td align=center bgcolor=$xbgrnd>Hcol4</td>
    <td align=center bgcolor=$xbgrnd><font color=$hfont><strong>Hcol5</strong></font></td>
    <td align=center bgcolor=$xbgrnd><font color=$hfont><strong>Hcol6</strong></font></td>
    <td align=center bgcolor=$xbgrnd><font color=$hfont><strong>Hcol7</strong></font></td>
    </tr>";
    
    while ($r = mysql_fetch_array($result)) {

      
      echo "<tr bgcolor=$bgc>
             <td align=center><font color=$fcolor>$col1</td>
             <td align=center><font color=$fcolor>$col2</TD>
             <td align=center><font color=$fcolor>$col3</TD>
             <td align=center><font color=$fcolor>$col4</TD>
             <td align=center><font color=$fcolor>$col5</TD>
             <td align=center><font color=$fcolor>$col6</TD>
             <td align=center><A href=$zvloc target=_blank>$col4></TD>
           <TR /></TR>"; }
 echo "</TABLE>"; }
 else {
echo "No data."; } mysql_free_result($result);
 

?>

<script language="javascript" type="text/javascript">  
     setFilterGrid("mtable01");  
 </script>
</DIV>
</body>

Email : carlosjuan_17 AT comcast DOT net


1 Reply

1 . 2009-08-19 20:48:34

Max wrote:

You have 2 closing </TR> and actually this line seems to be be wrong as A tag is opened and not closed:

<td align=center><A href=$zvloc target=_blank>$col4></TD>
           <TR /></TR>"; }

Email :


Top of page

244 . 2009-08-17 10:56:09

Stephen wrote:

Hi,

neat scripts, work really well apart from (for me anyway) summing columns.

If I want to sum 2 columns, I have to enter the 2nd column in twice i.e.

//<![CDATA[
    var totRowIndex = tf_Tag(tf_Id('invTable'),"tr").length; 
    var invTable_Props =  {
        alternate_rows: true,   
        btn_reset: true, 
        btn_reset_text: "Reset", 
        btn_text: " > ", 
        col_0: "select", 
        col_1: "none",
        col_2: "select",
        col_3: "select",
        col_4: "select",
        col_5: "select",
        col_6: "select", 
        col_7: "none",
        col_8: "select",
        col_9: "none",
        col_10: "none",
        col_11: "select",
        col_12: "select",       
        display_all_text: " [ Show all ] ",
        col_number_format: [null,null,null,null,null,null,null,null,null,'US','US',null,null],
        rows_counter: true, 
        rows_counter_text: "Rows: ",
        col_operation: {
            /* for some reason the 2nd element isn't processed correctly so it needs to be entered twice */
            id: ["tableTot9","tableTot10","tableTot10"],
            col: [9,10,10], 
            operation: ["sum","sum","sum"], 
            write_method: ["innerHTML","setValue"],
            exclude_row: [totRowIndex],
            decimal_precision: [0,0,0]
        }, 
        rows_always_visible: [totRowIndex]
    };
    setFilterGrid("invTable",invTable_Props);
//]]>

I have 13 columns, and I'm summing columns 9 and 10.

If I only have  "id: ["tableTot9","tableTot10""], col: [9,10]," etc, then only column 9 is summed, column 10 is not.  So I have to specify column 10 a second time.

This happenes on both old and new versions, FF and IE8.

Email : scarey_man AT hotmail DOT com


3 Replies

1 . 2009-08-27 16:15:51

Stephen wrote:

Incidentally, I originally used the example found at http://tablefilter.free.fr/ex.php#tbl1, which has innerHtml and setvalue.

Email : scarey_man AT hotmail DOT com


2 . 2009-08-27 16:14:07

Stephen wrote:

Yes, removing ["innerHTML","setValue"] and using ["innerHTML"] has done the trick.

Thanks,

Stephen

Email : scarey_man AT hotmail DOT com


3 . 2009-08-18 08:52:13

Max wrote:

Stephen,

please have a look to the 1st table of this demo page http://tablefilter.free.fr/data-types.htm. From what I can see  you don't have any tot_row_index property specified, although this doesn't seem to be the problem for me. Is there a reason why you use 2 different write methods, innerHTML and setValue?

Email :


Top of page

245 . 2009-08-15 14:02:05

seamoon wrote:

Hi, is it possible to add text to search fields like the word "search" or "find". Some sites put light grey "find" text there and even you type it still there. I like that style. Can we do this?

Dictionary
x
+
?
Null.

Email : seamoon AT moncourrier DOT fr DOT nf


1 Reply

1 . 2009-08-19 20:51:50

Max wrote:

Yes you can do it, you just need to create an image with "search" or "find" written on it and then change the filter class in the stylesheet (filtergrid.css) in order to set the background.

Email :


Top of page

246 . 2009-08-13 18:27:47

Mizery Made wrote:

Is it possible to somehow store your data in an XML. Have an XSL that would manipulate that data into the individual rows, and then somehow load this converted XML data into an HTML file where the rest of this script stuff is located? Or perhaps store the data in an XML, and then instead of transforming and importing into XML, combine the processes and have the data transformed into the rows and have all the other scripting stuff in the XSL, resulting in an HTML page with your table when you load the XML?

I've been looking around for ways of having ann HTML page call an XML file, but have it transformed before it's displayed on the page (such as in this case, converted into the table rows automatically when it's called from the HTML file), but having no luck. All the methods I've seen just ended up with blank pages. Boo. Though some of them were pretty old, like, 2003 and stuff.

Haven't had much luck going purely XSL either... though I am a n00b, so maybe I still don't know what I'm doing when it comes to combining HTML, XML data and Javascript in an XSL Output. Haha.

Email : i DOT am DOT mizery DOT made AT hotmail DOT com


1 Reply

1 . 2009-09-14 11:42:03

Tom wrote:

It can be done with only XML. It will return the xml to the browser so you will need XSL to transform in usable data.

In your XML document use a stylesheet reference:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="ExtGrid.xsl"?>

And in your XSL use reference to tablefilter and css, js and the likes:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <html>
      <head>
        <style type="text/css" media="screen">

          @import "css/filtergrid.css";
          /*====================================================
          - html elements
          =====================================================*/
          body{
          margin:5px; padding:5px; /*border:1px */ solid #666;
          font-family:Arial, Helvetica, sans-serif; font-size:88%;
          }
          h2{ margin-top: 50px; }
          table{ border:1px solid #ccc; font-size:85%; }
          caption{ margin:10px 0 0 5px; padding:10px; text-align:left; }
          th{
          background:#FF4222 url(images/ad_th.jpg) left top repeat-x;
          border-left:1px solid #C7C7C7;
          padding:5px; color:#fff; height:25px;
          }
          td{ padding:2px; border-bottom:1px solid #ccc; border-right:1px solid #ccc; height:25px; }
          pre{ margin:5px; padding:5px; background-color:#f4f4f4; border:1px solid #ccc; }

          /*====================================================
          - TF grid classes
          =====================================================*/
          .myLoader{
          position:absolute; padding: 5px 10px 5px 10px;
          margin:155px 0 0 200px; width:auto;
          z-index:1000; font-size:12px; font-weight:bold;
          border:1px solid #FF4222; background:#fff;
          vertical-align:middle;
          }
          #extGrid{
          float:left; background:#FFF2F0;
          border:1px solid #000000; width:250px;
          margin-right:10px; padding:10px;
          }
          .inf{
          clear:both; /*width:95%;*/ height:25px;
          background:#f4f4f4; font-size:11px;
          margin:0; padding:1px 3px 1px 3px;
          border:1px solid #ccc;
          }
        </style>
        <script src="js/tablefilter.js" language="javascript" type="text/javascript"></script>
        <script src="js/ExtGridConfig.js" language="javascript" type="text/javascript"></script>
        <!--<script language="javascript" type="text/javascript"></script>-->
      </head>
      <body>
        <div id="extGrid">
...

Just make sure your XSL produces a correct table first, then add the script.

Email : t549635 AT zonnet DOT nl


Top of page

247 . 2009-08-13 16:40:47

tunay wrote:

I see in your examples input fields justified to whole cell but my input fields aligned left and only covers 1/3 of the cell. How can I  justify to whole cell or better how can I center the input field on cell?

Dictionary
x
+
?
Null.

Email : montaignece AT gmail DOT com


1 Reply

1 . 2009-08-15 10:14:38

Max wrote:

Tunay,

it looks like you haven't loaded the script's stylesheet filtergrid.css...

Email :


Top of page

248 . 2009-08-13 16:15:23

Mizery Made wrote:

Is there any way to set up a Custom Select Box for a column, where the values you enter filters with "Contains" and not "Exact Match" when selected? I'm sure not many would find that useful, since tables are typically "one value per cell," but given the nature of the data I'm working with, I have ended up having to enter some things as "Value 1; Value 2; Value 3" for instance. This would allow me to set up a custom filter box with separate values for "Value 1", "Value 2" and "Value 3" and have someone be able to select "Value 3" and find that "Value 1; Value 2; Value 3" entry as well as one that is just "Value 3."

 

Maybe it's time I finally look into databases and PHP and stuff like that. However, if it's possible with your table, that would be awesome because it would allow me to stick with the simple spreadsheet-like approach, and probably a lot less reading (in regards to learning another approach to data storage like a database that is).

Email : i DOT am DOT mizery DOT made AT hotmail DOT com


3 Replies

1 . 2009-08-14 10:28:43

Mizery Made wrote:

... real cute.

Email :


2 . 2009-08-14 05:36:10

Mizery Made wrote:

hI StUpId mAx wHaTs GoInG oN HeRe

Email : i DOT am DOT mizery DOT made AT hotmail DOT com


3 . 2009-08-13 16:56:00

Mizery Made wrote:

Nevermind... I'm an idiot. "*Value"... duh me. :\ Though now if only you could figure out the whole resizable columns thing, and it would be awesome if you could find a way to make the cells more spreadsheet-like in the sense that long values are clipped instead of wrapped (with a tooltip, like <abbr>, popping up when hovered over and showing the entire contents. dhtmlxGrid has both of those features (among some other nice ones) but  their free version is both limited opposed to Pro as well as buggy or something. Despite following their tutorial to a tee, the table was only showing up in Chrome (not IE or Firefox as they state their script supports)

Alwell, kicked that script to the curb and found this one. At least yours works like it's supposed to. Smile

Email : i DOT am DOT mizery DOT made AT hotmail DOT com


Top of page

249 . 2009-08-13 10:42:18

Mahesh wrote:

Hi Max,

I am using Joomla to build a website. So i created a component with the below code.

<!--<html>

<head>

<script language="javascript" src="tablefilter.js"></script>

</head>

<body>

<table border = 1 id = "table1">

<tr><td>heading1</td><td>heading2</td><td>heading3</td></tr>

<tr><td>abc</td><td>qbd</td><td>qwe</td></tr>

<tr><td>qqq</td><td>aaa</td><td>sss</td></tr>

</table>

<script language="javascript" type="text/javascript">

setFilterGrid("table1");

</script>

</body>

</html>-->

The grid is formed at the top of the table. But filtering is not working.

So i tried executing the same code outside joomla and it works perfectly fine. The only diffence i could see is the URL of the two files.

This URL worked for me:  http://localhost/ranking.php

But in joomla the URL for the component in like this : http://localhost/joomla/index.php?option=com_ranking&Itemid=120

 

Both file names are ranking.php, but the way they are accessed is different. So I was wondering whether this was the problem.

Do you have an idea on this? Is there a way to make the script run in joomla?

 

Email : maheshsiddaraju AT yahoo DOT com


2 Replies

1 . 2009-08-16 08:34:38

Mahesh wrote:

Hi Max, 

Thanks the problem was with moo tools conflict in joomla. Thanks for the insight. Works fine

Email : maheshsiddaraju AT yahoo DOT com


2 . 2009-08-15 10:23:02

Max wrote:

From what I understand the problem is defenitely not in the URL difference. Have a look to Joomla documentation to see how to add client-side scripts to pages.

Email :


Top of page

250 . 2009-08-12 14:17:31

Mahesh wrote:

Hi Max, 

Sorry to bother you with a very basic question. I cant get the filter to work. Here is the simple code. Can you tell me what i may be doing wrong. 

<!--<html>

<head>

<script language="javascript" src="tablefilter.js"></script>

</head>

<body>

 

<script language="javascript" type="text/javascript">

setFilterGrid("table1");

</script>

 

<table border = 1 id = "table1">

<tr><td>abc</td><td>the</td><td>qwe</td></tr>

<tr><td>abc</td><td>qbd</td><td>qwe</td></tr>

<tr><td>abc</td><td>wer</td><td>qwe</td></tr>

</table>

</body>

</html> -->

Email : maheshsiddaraju AT yahoo DOT com


2 Replies

1 . 2009-08-12 22:13:59

Mahesh wrote:

Hi Max,

 

Thanks a lot, that worked like a charm.

Absolutely Brilliant Script.

 

Thanks a ton!

Email : maheshsiddarajuATyahooDOTcom


2 . 2009-08-12 19:40:00

Max wrote:

Hi Mahesh,

 

just place the javascript block with setFilterGrid call after the table and before body closing tag (</body>)

Email :


Top of page

251 . 2009-08-06 06:06:52

sundar wrote:

Hi Max

at the Html table filter Header section i want to add label near to each filter text box. Could you please guide me to add label near to filter text box?

Email : sundar DOT mahalingam AT gmail DOT com


1 Reply

1 . 2009-08-08 10:04:57

Max wrote:

Sundar,

you use the GetFiltersRowIndex() method to get the filters row DOM element:

var filtersRow = myTF.tbl.rows[myTF.GetFiltersRowIndex()];

and then get a specific cell, 2nd cell for example:

var myCell = filtersRow.cells[1];

Once you have a cell use the javascript DOM methods (appendChild or insertBefore) to insert your text.

Email :


Top of page

252 . 2009-08-04 05:49:14

Babu wrote:

Max = (!Min)

I have set paging property as true and Paging length is 50. Html table has 100 rows. After loading with Html table filter it shows 50 rows per page and pagination control is available thats fine and good. I have entered text on filter textbox after filtering the rows it has only 45 rows. I want to remove pagination control if the html table has less than  page length. Could you please guide me to hide pagination control whenever html table row size is less than  page length.

Email :


2 Replies

1 . 2009-08-04 14:50:58

Babu wrote:

Thanks Max. :-)

 

Email :


2 . 2009-08-04 13:56:11

Max wrote:

Hi Babu,

what you could do is to use the on_after_filter event in the config object to show/hide the results per page combo based on filters results:

...
on_after_filter: function(o){
    if(o.nbVisibleRows < o.resultsPerPageSlc.value)               
    {
        o.resultsPerPageSlc.style.visibility = 'hidden'; //drop-down element
        tf_Id(o.prfxSlcResultsTxt+o.id).style.visibility = 'hidden'; //text preceding drop-down
    } else {           
        o.resultsPerPageSlc.style.visibility = 'visible';
        tf_Id(o.prfxSlcResultsTxt+o.id).style.visibility = 'visible';
    }
},
...

Email :


Top of page

253 . 2009-08-03 16:54:32

Sam wrote:

Hi Max,

I have got a problem again, i am sure you would be glad to know this time.

I upgraded the script from 1.9.3 to 1.9.4. Then, suddenly i tried to install "Columns Visibility Manager" extension.

Then i uninstalled "Columns Visibility Manager", but then, (after applying 2~3 filters) my table is filtering itself on the time specified in exec_delay, repeatedly. (Denying me the right to useEmbarassedCry)

I tried a downgrade, it is now working fine. But, i want the newer version, as it is really good with "multiple" type filters.

 

Regards

Sam

Email : ezra_samuel AT yahoo DOT co DOT in


2 Replies

1 . 2009-08-07 13:27:00

Sam wrote:

Max,

I am sorry, i can't share any date.

But, the problem seems to be with "refresh_filters: true," On IE6. I also tried with Firefox It was just working fine.

I turned it to false on IE and it just worked fine.

 

Kindly check. It was awesome to see in firefox, but users can only use IE6.

 

Regards

Sam

Email :


2 . 2009-08-03 21:13:40

Max wrote:

Hi Sam,

I can't reproduce your problem and believe me I tried on different browsers. Please send me a working example of this behaviour in a HTML page (no server side pages) in a zip archive. Do not hesitate to add instructions on how to fire the bug.

Thanks in advance,

Email : tablefilter AT free DOT fr


Top of page

254 . 2009-07-31 15:37:09

Sam wrote:

Hi Max,

Do you have any feature to implement a chart (Pie, Bar, Stacked Bar) with this script?

Or can we expect one in future?

 

Cheers

Sam

Email : ezra_samuel AT yahoo DOT co DOT in


1 Reply

1 . 2009-08-01 10:24:13

Max wrote:

Hi Sam,

no, there is no such feature with this script and I will focus only on features related to filtering or enhancing a HTML table.

Email :


Top of page

255 . 2009-07-31 12:28:02

Laszlo wrote:

Max

i have set highlight_keywords as true in script. I entered a text like( =1000) in search text box.  After loading output, keywords have not hightlighed. Can you plz guide me to highlight keywords?

Email :


2 Replies

1 . 2009-08-03 05:24:08

Laszlo wrote:

Thanks a lot Max. I will try it out and let you know.

Email :


2 . 2009-08-01 11:09:47

Max wrote:

Laszlo,

the highlight keywords feature works only if there are no operators in the search query. This is something to be improved in the next version(s). In any case, if you feel like doing it yourself here you have some guidance:

  1. Locate the _Filter method in the code and then search for the highlight function
  2. You will find:
    function highlight(str,ok,cell){//keyword highlighting
        if( o.highlightKeywords && ok )
            tf_HighlightWord( cell,str,o.highlightCssClass );
    }
  3. The idea is to remove any kind of operator (!,*,ect.) from searched term:
    function highlight(str,ok,cell){//keyword highlighting
        if( o.highlightKeywords && ok ){
            str = str.replace(re_lk,'');
            //.. here all other tests
            tf_HighlightWord( cell,str,o.highlightCssClass );
        }
    }
  4. You will find all the expressions (re_lk, re_d etc.) to remove just before the highlight function.

If you manage improving this feature I would be grateful if could share your code so I won't have to dedicate time on this issue.

Thanks in advance

Email :


Top of page

256 . 2009-07-31 07:43:22

bobi wrote:

Hi

Its amzing script!!. I appreciate your hard work.

Email : bobi AT gmail DOT com


0 Reply

Top of page

257 . 2009-07-30 14:50:25

Joe wrote: