Column Filter Add-On problem

Column Filter Add-On problem

capitano4capitano4 Posts: 2Questions: 0Answers: 0
edited March 2012 in Plug-ins
Hi everybody, sorry for my english :) ,
I used ASP Classic example on this site to connect my table to Ms Access DB, it's work fine. Now I'm trying to use the Column Filter Add-on and everything seems ok, but when I write to an input field it does not filter, even if for an instant the word "processing" appears. Have you an idea why this happens?
Thanks

Replies

  • capitano4capitano4 Posts: 2Questions: 0Answers: 0
    I solved first issue by editing the sample file on http://datatables.net/development/server-side/asp_classic

    I replaced this part of code:

    [code]
    'SEARCH - here we make the Where clause that will be used in the SQL query. You only put here the fields you want to search
    strWhere = " WHERE engine LIKE '%" & sSearch & "%' OR "
    strWhere = strWhere & " browser LIKE '%" & sSearch & "%' OR "
    strWhere = strWhere & " platform LIKE '%" & sSearch & "%' OR "
    strWhere = strWhere & " version LIKE '%" & sSearch & "%' OR "
    strWhere = strWhere & " grade LIKE '%" & sSearch & "%'"
    [/code]

    with this:

    [code]
    Dim aColumns
    aColumns = Array ( "engine", "browser", "platform", "version", "grade" )

    nCol = UBound(aColumns)
    sWhere=""

    'SEARCH
    if sSearch <> "" then
    sWhere = "WHERE ("
    for i=0 to nCol
    sWhere = sWhere & aColumns(i) & " LIKE '%" & sSearch & "%' OR "
    next
    sWhere = left(sWhere, Len(sWhere)-3)
    sWhere = sWhere & ")"
    end if

    'COLUMN FILTER
    for i=0 to nCol
    if Request("bSearchable_"&i) = "true" and Request("sSearch_"&i)<>"" then
    if sWhere="" then
    sWhere = "WHERE "
    else
    sWhere = sWhere & " AND "
    end if
    sWhere = sWhere & aColumns(i) & " LIKE '%" & Request("sSearch_"&i) & "%'"
    end if
    next
    [/code]

    Now Column Filter is active, Column Filter Add-on text input works fine but I don't know how update value in select type, how date-range or number-range work in server-side method and why when use date-range type all forms in tfoot disappear ?!

    I was wondering if someone could give me a nudge in the right direction.
This discussion has been closed.