Board Logo

filter and case
chisholmd - 8/10/2006 at 10:53 PM

Does anyone know how to make search/filter case insensitive?

tigra - 8/11/2006 at 12:23 AM

check out last filtering option in demo2 inside the distribution package you received.

chisholmd - 8/14/2006 at 11:51 AM

I have tried filter types 9, 11, and 15 and searches are still case sensitive. Could this be a version thing? (I've cleared cache after .js updates)

'filter' : {
'type': 15

Anything I should try?

tigra - 8/14/2006 at 10:39 PM

If you see this feature working in the sample it should work in your configuration too. If it's not in the sample then submit a support ticket requesting the latest version of the script.

chisholmd - 8/23/2006 at 12:55 AM

I am not using the predefined filter bar as shown in demo2. I am using the exeFilt method.

here is the relevant code as I understand it from the docs:

<form name="TTForm0" onsubmit="return TTablePRO[0].exeFilt(1)">
<input type="Hidden" name="filtCol" value="1">
<input type="Hidden" name="filtType" value="3">
<strong>Movie Title</strong> &nbsp;
<input type="text" name="filtPatt1" value="">
<input type="button" value="search" class="srchBtn" onclick="TTablePRO[0].exeFilt(1)">
<input type="reset" value="clear" class="srchBtn" onclick="TTablePRO[0].exeFilt()">

<script type="text/javascript">
new TTable(tblCOLS, tblDATA, tblLOOK);

function pageinit(){

*the docs warned that the table and form had to be rendered before calling attachForm so I placed that call in a function that is called in the body's onload event.

**The docs don't provide a value to use for case insensitive substring matches but in demo2 the value is set to 3 so thats what I am using.

My filters work, but they are not case insensitive. Can you see anything obvious?

chisholmd - 8/23/2006 at 01:16 AM

In the docs it says:

4) Now, the form and its fields has to be attached to a desired table. Use attachForm(ref, nameC, nameP, nameT) method of Tigra Table PRO object instance where parameters mean the following:

* ref - a reference to the form object,
* nameC - a name of column index input field or drop-down select box, string
* nameP - a name of filtering pattern input field, string
* nameT - a name of filter type input field or drop-down select box, string

Specifically it mentions that the name passed for the filter type can be an input or a select box. However, when I used this:

<input type="Hidden" name="filtType" value="3">

It did not work, but when I changed it to:

<select name="filtType" style='display:none;'><option selected value='3'></option></select>

It did work.

So, I guess either the docs are mistaken, or maybe there is a bug where it does not check the field type before trying to read the value.

Its working, I'm happy, love your products, cheerio!

Back to forum: