JLo
|
Posted: 12/12/2003, 7:45 AM |
|
Hi All,
Im sure this is really simple for someone, I have a page with search grid and results grid. When I open the page the results grid seems to fire for all data from the table, I only want to display results once the search button is clicked and not on opening the page. Im new at this but if someone can tell me where in the code this takes place that would be a great help
thanks in advance
JLo
|
|
|
Rick Page
|
Posted: 12/12/2003, 7:54 AM |
|
Hi JLo,
I am use to using CCS with PHP and MySQL. I am not sure what your setup is, but hopefully this will give you an idea.
Add Custom Code to the BeforeBuildSelect for the grid in question.
global $grid_name;
// Write your own code here.
if (CCGetParam("s_keyword") == "") 's_keyword being the parameter that holds the search info.
{
$grid_name->ds->Where = $grid_name->ds->Where ."grid_name.some_id = 0";
}
I picked the id fileld because it is usually a number greater than 0.
Hope this helps.
Rick
|
|
|
Nicole
|
Posted: 12/15/2003, 6:25 AM |
|
Hi! The other way is to hide the form at all. The code is similar but instead of changing WHERE just make the form invisible
$form_name->Visible = false;
|
|
|
|