CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Hide Panel according to record value

Print topic Send  topic

Author Message
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

8-)
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
Willj

Posts: 4
Posted: 01/18/2008, 9:43 PM

maybe we can help each other check your pm
View profile  Send private message
ckroon

Posts: 869
Posted: 01/19/2008, 4:46 PM

No luck with this yet folks... any ideas?
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
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
>
> 8-)
> ---------------------------------------

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.
View profile  Send private message
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! :-D
Thanks!
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.