uhm...... 
2. seems hard but not impossible. However, what do you need specifically ? 
instead of *auth_user.first_name="hello"* just *First name="hello"* or 
*whatever 
suites me best=Hello*? What if some column names collide ?
3. unless you're referring to custom-coded filters in datatables.net, all 
it has is a single input that searches all fields in a "contains()" manner, 
i.e. if you put "a" in it it will filter all the rows where "a" is found in 
any column. That's what grid does by default if you put "a" in the main 
input field and press "search".

In other words, current search widget is easy enough for every user out 
there, extremely flexibile while retaining a "quick" way to search through 
your table ..... we can shift that balance a little but up to a certain 
point: it kinda has to suite everybody's needs. 

On Wednesday, May 1, 2013 7:59:07 PM UTC+2, Richard wrote:
>
> Hello,
>
> I did some research about SQLFORM.grid() Search Question and I summarize 
> what I found here :
>
> Search requirements for me to use SQLFROM.grid() in place of 
> Datatables.net :
>
>
>    1. Need to be able to search the representation for referenced fields *
>    (Solved)*
>    2. No database field name in the Query Builder...
>       - I would like the labels to be used in the Query Builder and then 
>       be translated into the proper query passed to the URL *(Open, a 
>       solution seems to exist)*
>       3. User should have the option to search over all the fields (like 
>    Datatables.net search/filter)* (Open, a solution seems to exist)*
>
>
> *1)* I was searching a way to search representation of a referenced field 
> and I found this answer (from Niphold) :
>
> How to search referenced field (query with join) :
> https://groups.google.com/d/msg/web2py/Z4HZNNLlyYs/lknATE2iKJoJ
>
>
> *2)* But then, I realize that for the construction of the search the user 
> has to know the database fields names (the labels are not taking into 
> account by the query builder) in order to create his search... 
>
> I try to solve that with SQLFROM.grid headers=HEADERS_DICT, but still the 
> query constructor display the database field name and not there labels...
>
> About that issue, I found this thread that seem to address the problem 
> into a elegant way :
>
> https://groups.google.com/forum/?fromgroups=#!topic/web2py/JVDZtZCsRTw
>
> So, the solution seems to exist, but I would have to implement my own or 
> reuse this one... Did this had been (could be) added built-in in 
> SQLFORM.grid()??
>
> *3)* I would like to preserve something I consider as a "feature". 
> Actually I use Datatables.net almost every where I need a grid, and my 
> users know how use the search/filter of Datatables, so I would have this 
> option into SQLFORM.grid()...
>
> I found this share :
> https://groups.google.com/d/msg/web2py/9_1ECdKHKUo/8OISg7o8OVIJ
>
> Again, I have to test and see how it fit beside the query builder... 
> Having to different input search may be weird for user or lead to 
> misunderstanding.
>
>
> Is there other important things I should know about SQLFORM.grid() and 
> search?
>
> What the future for a better search experience with SQLFORM.grid()?
>
> I think the greatest advantage of SQLFORM.grid() over other Javascript 
> grid for instance is the ability to create a search and share it to other 
> user as a link... Of course there is also the possibility to create more 
> complexe query than a simple filter box. And I want these features in my 
> app.
>
> Richard
>
> Other thread :
>
> https://groups.google.com/forum/?fromgroups=#!topic/web2py/hKe6lI25Bv4
>
> Related :
>
> https://groups.google.com/forum/?fromgroups=#!topic/web2py/bScnOfTCvL8
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to