Iron Speed Technical Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment  
jzacharuk

Registered:
Posts: 5
Reply with quote  #1 
I have an Add Client page with numerous fields. I have grouped these fields and added them into a few different panels that I have created (ie BillingPanel contains BillingAddress, DemographicPanel contains basic demographics, etc). The structure is like:

AddClient.aspx
-ClientRecordControl
--ClientRecordPanelHeader
--ClientPanel
---ClientFields
----DemographicPanel
----BillingPanel
----Etc

I would like to be able to hide certain panels based on certain situations (ie hide BillingPanel when billing information should not be entered). I have tried using 
Code:
 FindControlRecursively("BillingPanel")
 within the
Code:
Control_PreRender
Code section of the page, but I receive a null value.

Also, hiding the individual fields is not a valid solution as it leaves blank lines and I would prefer hiding the controls over disabling them.
akeshgupta

Avatar / Picture

Iron Speed MVP
Design, Develop & Deliver

Registered:
Posts: 1,090
Reply with quote  #2 
The Panels have a different control names where rendered.  I recommend putting the panel in a div tag where you can assign and id and runat=server attributes.  Then you can write code for the div tag to make it invisible.

HTH,

__________________
Akesh Gupta
Light Speed Solutions, LLC.
If I rest, I will rust !   Let's share the knowledge !
bhavesh7098

Registered:
Posts: 56
Reply with quote  #3 
Hi Akesh,
            I have similar situations. I want to hide second panel  based on the user select values from drop down list in first panel. Can  you please help on me?

Thanks,
Bhavesh
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,927
Reply with quote  #4 
If BillingPanel is a control ID this must work:

this.FindControlRecursively
("BillingPanel").Visible = false


Jimi J



__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

pinbot

Avatar / Picture

MVP Consultant
Registered:
Posts: 952
Reply with quote  #5 
You may be confusing Iron Speeds "Panels" with asp.net panels.

Iron Speeds panels are just naming conventions for nested tables.  You cannot actually find them or hide them.

You need to wrap your Iron Speed panels in an asp.net panel and hide the asp.net panel.

Drag a "Panel" from the ".NET Controls", then move the gen[tongue]anel to be between the asp.net panel tags (where the "Your Panel text goes here" is in the editor)

In the HTML editor you should have something like this:

<asp[tongue]anel id="MyHidableASPPanel" runat="server">
<gen[tongue]anel id="OwnerTab" />
</asp[tongue]anel>


Then in the code, you findcontrol for "MyHidableASPPanel" and set visible to false for it, not the gen[tongue]anel.



__________________
C. Bryan Patrick II
Iron Speed Designer MVP Consultant
Pseudo Consulting
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,927
Reply with quote  #6 
Hi Bryan!

The thing I know is they wanted to dynamically hide/show Tab Panels and this is one option:

http://www.screencast.com/t/NBIGq1eX


Cheers,
Jimi J

__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Download Iron Speed Designer

Terms of Service Privacy Statement