ckroon
Posts: 869
|
| Posted: 01/18/2008, 9:07 PM |
|
Hi All.
I love working with panels and I use the hide/show method a lot with this in the before show event:
if (CCGetFromGet("url_value",-1) == -1)
$Component->Visible = False;
else
$Component->Visible = True;
What I need help with is... I need a small grid to show up ONLY when a students grade = '8'.
table-classlist
field-grade
_________________
Walter Kempees...you are dearly missed. |
 |
 |
Willj
Posts: 4
|
| Posted: 01/18/2008, 9:43 PM |
|
maybe we can help each other check your pm
|
 |
 |
ckroon
Posts: 869
|
| Posted: 01/19/2008, 4:46 PM |
|
No luck with this yet folks... any ideas?
_________________
Walter Kempees...you are dearly missed. |
 |
 |
datadoit
|
| Posted: 01/20/2008, 7:11 AM |
|
ckroon wrote:
> Hi All.
> I love working with panels and I use the hide/show method a lot with this in
> the before show event:
>
> if (CCGetFromGet("url_value",-1) == -1)
> $Component->Visible = False;
> else
> $Component->Visible = True;
>
> What I need help with is... I need a small grid to show up ONLY when a students
> grade = '8'.
>
> table-classlist
> field-grade
>
> 
> ---------------------------------------
Where is the relation to the Student Grade? Is it in the URL or a session?
If it's in the URL, the grid's BeforeShow:
if (CCGetParam("StudentGrade","") !== "8") {
$Container->Visible = false;
}
|
|
|
 |
ckroon
Posts: 869
|
| Posted: 01/20/2008, 7:20 AM |
|
It's in the database
table: classlist, field:grade
The url value that identifies the student is 'student_id'
_________________
Walter Kempees...you are dearly missed. |
 |
 |
DonB
|
| Posted: 01/20/2008, 8:54 AM |
|
I think what I'd do is be sure to have 'WHERE grade = 8' in the Data Source,
then the Before Show of the grid would contain:
$Component->Visible = ($Component->DataSource->RecordsCount > 1);
--
DonB
http://ccswiki.gotodon.net
"ckroon" <ckroon@forum.codecharge> wrote in message
news:5479366b058ea4@news.codecharge.com...
> It's in the database
> table: classlist, field:grade
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
ckroon
Posts: 869
|
| Posted: 01/20/2008, 5:05 PM |
|
Genius. Pure genius! 
Thanks!
_________________
Walter Kempees...you are dearly missed. |
 |
 |