kirchaj
Posts: 215
|
| Posted: 05/28/2008, 1:49 PM |
|
Is there a way to keep a grid from loading data from the database until the user enters a search criteria?
I know I can put the search on a separate page and call the grid, but I would like to keep both items on the same page. I have searched the forums and have not found this particular scenario.
Thanks for the help
TK
|
 |
 |
kirchaj
Posts: 215
|
| Posted: 05/28/2008, 2:05 PM |
|
After playing with this for a minute I have a solution that isn't too bad but still requires the extra search page. I have a search page with no grid that calls the page with both the search and grid on it.
But I would still like a one page solution.
TK
|
 |
 |
aradi
Posts: 66
|
| Posted: 05/28/2008, 2:28 PM |
|
Take a look at this post:
http://forums.codecharge.com/posts.php?post_id=96980&s_...arameter+search
|
 |
 |
mentecky
Posts: 321
|
| Posted: 05/28/2008, 6:20 PM |
|
Quote kirchaj:
Is there a way to keep a grid from loading data from the database until the user enters a search criteria?
I know I can put the search on a separate page and call the grid, but I would like to keep both items on the same page. I have searched the forums and have not found this particular scenario.
Thanks for the help
TK
Yes... put a hidden field in the search grid, for example ShowGrid. Set it's default value to "1". In the grid's before show events add a "Hide/Show" action.
Action: Hide
Condition: Does not equal (<>)
Param1: Name: ShowGrid
Param1: Source Type: URL
Param2: Name: '1'
Param2: Source Type: Expression
That will hide the grid unless they submit a search.
Rick
_________________
http://www.ccselite.com |
 |
 |
wkempees
Posts: 1679
|
| Posted: 05/29/2008, 4:53 AM |
|
@R,
That will hide the grid, but it will still load it's data.
It could be part of the where though, making the grid select zero rows.
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
|
 |
 |
|