Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ListGrid filter issue

$
0
0
Hi
I have a serious issue. I'm using SmartClient Power 9.0.
I have a list grid that I initialize with an exact criteria when it opens:
Code:

isc.ListGrid.create({
            ID: "lgdVenueManage",
            showHeaderContextMenu: false,
            dataSource: "company_venue",
            showFilterEditor: true,
            cellHeight: 25,
            filterOnKeypress: true,
            fields: [
                {
                    name: "venue_name",
                    title: "Venue",
                    type: "text",
                    showHover: true
                },
                {
                    name: "status_name",
                    title: "Status",
                    type: "text",
                    showHover: true
                }
              ]
            }
);
cvarObjAdvancedFetchCriteria = {company_id: 1};  lgdVenueManage.fetchData(cvarObjAdvancedFetchCriteria);

This code works perfect. See the logs:
=== 2014-01-24 15:38:48,119 [ec-3] INFO SQLDriver - [builtinApplication.company_venue_fetch] Executing SQL query on
'Mysql': SELECT COUNT(*) FROM company_venue WHERE (company_venue.company_id=2)
=== 2014-01-24 15:38:48,120 [ec-3] DEBUG SQLDataSource - [builtinApplication.company_venue_fetch] Using SQL Limit query
=== 2014-01-24 15:38:48,120 [ec-3] DEBUG SQLDataSource - [builtinApplication.company_venue_fetch] SQL windowed select rows 0->75, result size 75. Query: SELECT company_venue.comment, company_venue.com
pany_id, company_venue.company_venue_id, company_venue.monthly_member_fee, company_venue.monthly_venue_fee, company_venue.status_cd, company_venue.venue_name FROM company_venue WHERE (company_venue.co
mpany_id=2) LIMIT 0, 75


Here's the issue. I enabled the filter fields at the top of each column of the list grid with showFilterEditor: true,

So, if I filter the list using this, it also change my original criteria from exact match to a like match:

=== 2014-01-24 15:40:30,079 [ec-1] DEBUG SQLDataSource - [builtinApplication.company_venue_fetch] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause WHERE $defaultWhereClause
=== 2014-01-24 15:40:30,079 [ec-1] DEBUG SQLDataSource - [builtinApplication.company_venue_fetch] Eval'd row count query:
SELECT COUNT(*) FROM company_venue WHERE (company_venue.company_id LIKE '%2%' AND company_venue.venue_name LIKE '%Fe%')


So, now it searches the original
WHERE (company_venue.company_id=2)
like:
company_venue.company_id LIKE '%2%'

I do NOT want to change all the filters to exact.

Please help. I can't find a solution from the help.

Viewing all articles
Browse latest Browse all 4756

Trending Articles