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
|
|
|
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.
|
|
|
caran
Posts: 15
|
Posted: 10/01/2012, 8:10 AM |
|
Thanks Lucius, this works!
|
|
|
|