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

 How to use Hide-Show Component

Print topic Send  topic

Author Message
caran

Posts: 15
Posted: 10/01/2012, 2:49 AM

Hy There!

I have a EditableGrid and for some Clients some Rows shoud not be shown.

Example:

Text1 - TextBox Text1
Text2 - TextBox Text2
Text3 - TextBox Text3

In the Session i have a variable called mand_name
If mand_name = "Mandant1" then i wont show the Row Text2

I think i have to use BeforeShow - Hide-Show Component for the solution, are i'm right?

If so, which values must i set to Parameters, Name a.s.o? Could anyone give me an example? Or knew somebody where i can find a example (useable for Dummies :-| )?

Thanks in advance :-D
View profile  Send private message
Lucius

Posts: 220
Posted: 10/01/2012, 4:57 AM

One of the possible ways here is to use Before Show Row event. Code in event would look something like:

  
if (CCGetSession('mand_name') == "Mandant1") {  
$Component->Text1->Visible = false;  
}  
else  $Component->Text1->Visible = true;  

Just make sure that you change the TextBox "Visible" property to "Dynamic" in the designer.

----

Hide-Show component is a different way to achieve this. It is useful if you want to show/hide something dynamically on client-side (without page refresh) with AJAX call. Then you need to correctly add and configure this feature to the component.

I think there is an example showing how to use it in CCS Example pack that you have installed with CCS.
View profile  Send private message
caran

Posts: 15
Posted: 10/01/2012, 8:10 AM

Thanks Lucius, this works!

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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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