I've followed Jim's model in creating my search filter, and it appears to
be working beautifully! Just have some questions that I would like to ask.
First - I slightly modified the selector code so that entries show up as
unique, by adding the "distinct" clause and ordering alphabetically by
category, by doing the following:
category_list = db().select(db.t_files.f_category, distinct=True,
orderby=db.t_files.f_category)
options = [OPTION(category_list[i].f_category,
_value=str(category_list[i].f_category)) for i inrange
(len(category_list))]
Will this become extremely inefficient and slow, and grind the system to a
halt as the database become large?
The second question concerns an important cosmetic change - is there a
good way to put the filter input fields (no labels) under the column
headers/labels in the grid?
Finally, if you wanted to redesign the filters to update after a certain
number of characters have been modified in an input field (i.e. without
having to click search), how would you go about doing that?
Thanks again!
-Lamps
On Wednesday, October 31, 2012 7:56:27 PM UTC-4, Jim S wrote:
>
> I'm attaching a quick-n-dirty search example. You'll have to provide your
> own data to get it running. It worked with my test data. Let me know if
> you have troubles and I'll be glad to work through them with you.
>
> -Jim
>
> On Wed, Oct 31, 2012 at 8:53 AM, Lamps902 <[email protected] <javascript:>
> > wrote:
>
>> Hi, Jim. It would be great if you could provide more details and some
>> code illustrating how you went about doing it. Thanks!
>>
>> -Lamps
>>
>>
>> On Wednesday, October 31, 2012 9:39:24 AM UTC-4, Jim S wrote:
>>>
>>> Using .smartgrid, I override the default filtering capabilities and
>>> provide my own. See attached screenshot. Let me know if you want more
>>> details. I think I uploaded a small example app to the list some time ago
>>> and should be able to find it or recreate it if you like.
>>>
>>> -Jim
>>>
>>> On Wednesday, October 31, 2012 8:33:52 AM UTC-5, Lamps902 wrote:
>>>>
>>>> Hi, Johann - I know you can build a complex query using the search box,
>>>> but that is far from intuitive for most users. I'd like to implement the
>>>> same look/feel/usability as was available in webgrid, and as is shown in
>>>> the image. Is there a reasonable way to do this? Thanks.
>>>>
>>>> -Lamps
>>>>
>>>> On Wednesday, October 31, 2012 2:40:05 AM UTC-4, Johann Spies wrote:
>>>>>
>>>>> You can do that by building a complex query using the search box.
>>>>>
>>>>> Regards
>>>>> Johann
>>>>>
>>>>>
>>>>> --
>>>>> Because experiencing your loyal love is better than life itself,
>>>>> my lips will praise you. (Psalm 63:3)
>>>>>
>>>>> --
>>
>>
>>
>>
>
>
--