mramirez18
Posts: 56
|
| Posted: 05/19/2005, 6:29 AM |
|
What are the steps to show GRID with no records until a SEARCH is performed.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 05/19/2005, 11:36 AM |
|
http://support.yessoftware.com/kb_article.asp?article_id=65
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Manny Ramirez
|
| Posted: 05/19/2005, 5:02 PM |
|
For my project I have to use the following.
if (FormName.command.Where = "") then
FormName.command.Where = "FieldName = impossible_value"
end if
My FormName is projects_employees_employee, and I have 3 search dropdown lists Project Name, emp_name and spt_code.
What is the syntax that I need to use. If it is as simple as pluggin in the variables, for me it did not work.
|
|
|
 |
dhodgdon
Posts: 80
|
| Posted: 05/20/2005, 10:33 AM |
|
I have done something similar to this but I chose not to display the grid at all until the search was performed. I did this by using a URL paramater in the link to the page and set grid.visible=false if the parameter was present in the URL. I set the search record Preserve Parameters value to none. Since the search regenerates the URL and doesn't include the URL parameter passed to the page originally, the grid appears with the search results.
Example:
The URL parameter name I used when linking to the page was ShowGrid.
The grid name was Results.
In the BeforeShow event for the grid I used the following:
If NOT IsEmpty(CCGetParam("ShowGrid", Empty)) Then
results.visible = False
end if
It doesn't matter what you set the URL parameter to since it is only testing for its existance. My URL that linked to the page looked like .../results.asp?ShowGrid=1
_________________
Regards,
David Hodgdon
|
 |
 |
peterr
Posts: 5971
|
| Posted: 05/20/2005, 12:10 PM |
|
Thanks David.
Note that similar example is in CCS Example Pack, Directory example: http://examples.codecharge.com/ExamplePack/Directory/Directory.php
The grid is not shown until some records are found.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
Manny Ramirez
|
| Posted: 05/21/2005, 5:51 AM |
|
The code u mention will hide the grid form whenever the grid is empty.
|
|
|
 |
Manny Ramirez
|
| Posted: 05/21/2005, 6:03 AM |
|
David,
Can you provide steps on your solution. I am still learning my way around CodeCharge Studio.
Thanks
|
|
|
 |