kmcook
Posts: 6
|
| Posted: 11/02/2004, 9:43 PM |
|
In ASP this in the Before Show Server gives me an empty grid untila search form is filled and submitted. That is, the grid is visible but empty..
It does as required, returning the 'No records yet selected" as the default message.
if (grdRecords.command.Where = "") then
grdRecords.command.Where = "1=2"
end if
....whereas, in learning PHP, I've tried this in the Before Show of the grid but still get a fully populated grid before any search occurs.
What's my fix please?
...
global $grdRecords;
if ($grdRecords->ds->Where == "") {
$grdRecords->ds->Where = "1=2" ;
}
...
TIA
Casey
|
 |
 |
peterr
Posts: 5971
|
| Posted: 11/02/2004, 9:48 PM |
|
I don't know the solution in PHP but you shouldn't need any code for this. The solution is described here: http://support.yessoftware.com/kb_article.asp?article_id=65
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
mrachow
Posts: 509
|
| Posted: 11/03/2004, 12:02 AM |
|
An additional remark only.
I wonder that it even works under ASP because the event you have choosen should be too late.
The link peterr provided should be just your solution but the point is to choose event Before Execute Select.
Regards,
Michael
_________________
Best regards,
Michael |
 |
 |
Casey
|
| Posted: 11/03/2004, 1:20 PM |
|
Ahhh...
Code OK, wrong event. All working as required now.
Thanks peterr and Michael.
Casey.
|
|
|
 |
|