I was going to say the same thing, I think you have to click the property to
enable the filter bar
There's other ways of doing it. One easy way is to make a 2-table form, with
the states on the left and the table data on the right. Assuming that the name
"State" is the only common column between the 2 tables, scrolling thru the list
of states on the left will automatically update the grid on the right.
Karen
-----Original Message-----
From: Dan Goldberg <[email protected]>
To: [email protected] <[email protected]>
Sent: Wed, Jun 12, 2019 8:40 am
Subject: RE: [RBASE-L] - Filtering Enhanced DB Grid rows with PROPERTY commands
#yiv6078659999 #yiv6078659999 -- _filtered #yiv6078659999 {panose-1:2 4 5 3 5 4
6 3 2 4;} _filtered #yiv6078659999 {font-family:Calibri;panose-1:2 15 5 2 2 2 4
3 2 4;} #yiv6078659999 #yiv6078659999 p.yiv6078659999MsoNormal, #yiv6078659999
li.yiv6078659999MsoNormal, #yiv6078659999 div.yiv6078659999MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}
#yiv6078659999 a:link, #yiv6078659999 span.yiv6078659999MsoHyperlink
{color:blue;text-decoration:underline;} #yiv6078659999 a:visited,
#yiv6078659999 span.yiv6078659999MsoHyperlinkFollowed
{color:purple;text-decoration:underline;} #yiv6078659999
p.yiv6078659999msonormal0, #yiv6078659999 li.yiv6078659999msonormal0,
#yiv6078659999 div.yiv6078659999msonormal0
{margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-serif;}
#yiv6078659999 span.yiv6078659999EmailStyle19
{font-family:sans-serif;color:windowtext;} #yiv6078659999
.yiv6078659999MsoChpDefault {font-family:sans-serif;} _filtered #yiv6078659999
{margin:1.0in 1.0in 1.0in 1.0in;} #yiv6078659999 div.yiv6078659999WordSection1
{} #yiv6078659999 I think you need to have the filter bar enabled for it to
work. your code looks good. Dan From: 'R Hopkins' via RBASE-L
<[email protected]>
Sent: Tuesday, June 11, 2019 4:18 PM
To: [email protected]
Subject: [RBASE-L] - Filtering Enhanced DB Grid rows with PROPERTY commands
I have been trying to learn how to use the PROPERTY EnhDBGrid FILTER commands
by trial and error, but without success. I am hoping someone can fill in the
blanks for me. I am
confident someone has done something similar to this before. One other note; I
am using
R:BaseX, not R:BaseX.5
SITUATION (not using my real data to keep it simple):
I have a 3 column table named Contacts with 40 rows
City TEXT 32
State TEXT 2
Zipcode INTEGER
I have a form containing:
An Enhanded DB Grid Property, Component ID: Places Table: Contacts
I didn't click any property boxes related to filtering within this
Property.
A Variable Radio Group Property, Component ID: StateGroups
that loads variable fState with one of 3 selectable values 'CA' or 'CT'
or 'WA'
WHAT I WANT TO DO
I want to use the value loaded in variable fState to filter which rows are
displayed in
the Enhanced DB Grid. Every time a different Radio Button is selected,
reloading the
value of variable fState, have the rows displayed in the Enhanced DB Grid
change to display
only those in column State that match the value in variable fState.
I don't want a filter bar displayed within the Enhanced DB Grid Property, as
it will
compete with the Radio Group for user's attention (and State is the only
column to
be filtered on).
I want all filtering to occur behind the scenes using the PROPERTY commands.
WHAT I HAVE TRIED
To get this filter working, I have tried placing the following commands in
the forms ON AFTER START EEP - just to see how they work - or not work.
My expectation being that when the forms starts, it will display only rows
WHERE state = 'CA' (my default for initial display). Attempt #1 = No
rows filtered out, all 40 rows displayed
PROPERTY Places FILTERS->COLUMN_NAME->state 'CA'
Attempt #2 = No rows filtered out, all 40 rows displayed
PROPERTY Places FILTERS->COLUMN_NAME->state->ADD_ITEM 'CA'
Attempt #3 = Error message, "No rows exist or satisfy the specified clause"
PROPERTY Places FILTERTYPE 'EQUAL'
PROPERTY Places FILTERS->COLUMN_NAME->state 'CA' But none of these
commands caused that to happen. Including the FILTERTYPE command results in
No rows being found. I suspect there are additional commands required that I
have not been able to identify. Note that I haven't introduced the
variable fState into the commands yet to make my learning curve simpler.
But once I can make the value 'CA' work, I should be able to replace it with
.fState and use the PROPERTY commands within the ON CLICK EEP for the
Variable Radio Group Property.
The RBASE documentation is pretty good at describing what different
commands do. This is an exercise for me to learn how to put all the
commands together needed to implement a capability. I will be very
thankful to anyone who can provide me the complete set of commands (and/or
Enhanced DB Grid property item clicks) needed to make this work. NOTE I
normally do this type of filtering using a Variable Lookup List View Property
instead
of an Enhanced DB Grid Property because it has a WHERE clause capability.
But the
Enhanced DB Grid Property had some features I want to use, like the footer
for summing
and the ability to center the header names within each column, etc. It also
forces me
to learn how to use the Enhanced DB Grid Property's filter capabilities. R
Hopkins --
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/1792940103.84756.1560295106406%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout. --
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/2E4830CEC16615458329D3D83342F8D0011EA2DB76%40EXCHANGE10.
For more options, visit https://groups.google.com/d/optout.
--
For group guidelines, visit
http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rbase-l/1996733075.166383.1560348782558%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.