FrankR
Posts: 154
|
Posted: 09/13/2006, 1:36 PM |
|
Wow, I can't believe I can't get this.
I have a simple Grid, with search panel, and results grid, as generated by the Grid Builder. I then went in and changed a few of the search fields to be listboxes of choices.
Easy enough.
Now all I want to do is initialize some of those choices before the query is built and run, and I'm just not getting it. How/where do I initialize the value of a listbox in the Search panel?
Thank you.
_________________
FR |
|
|
wkempees
Posts: 1679
|
Posted: 09/13/2006, 3:48 PM |
|
Ambigous question, Frank.
What is it you want:
Do you want the Listboxes in the SearchForm to be initalized?
Have you noticed that each Listbox (if SQL based) has it's own SQL events?
Before Execute and so on.
OR:
Do you have trouble in catching the selected listbox values in the Grid's SQL?
That would be in the VQB, using the parameter part of the Where.
Or by using CCGetParam or CCGetFromGet in the Before Execute Select.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
|
|
FrankR
Posts: 154
|
Posted: 09/14/2006, 5:04 AM |
|
I do fill the listboxes with the contents of other short tables.
What I wanted was one of the choices to be selected when the page is first displayed.
The simple answer I found was - calling the page with parameters. :)
_________________
FR |
|
|
Stan
|
Posted: 09/14/2006, 6:59 AM |
|
You should use Default Value property of List Box for this.
Stan
|
|
|
FrankR
Posts: 154
|
Posted: 09/14/2006, 8:29 AM |
|
Quote Stan:
You should use Default Value property of List Box for this.
Stan
That didn't work. For a Grid Builder-built search+gridresults form, what happens
after setting the Default Value of the ListBox is:
The query string gets built before the Default Value is applied, the search is executed,
and then the fill of the Default Value appears.
_________________
FR |
|
|
peterr
Posts: 5971
|
Posted: 09/14/2006, 10:17 AM |
|
I think that above solution is correct for "How/where do I initialize the value of a listbox in the Search panel?" A listbox is not related to a grid or grid search, and listbox can only pass a value to a grid when a search form is submitted.
If you want to display a grid with certain default filter then you would need to specify a default value in grid's datasource (Where parameters).
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|