473,591 Members | 2,871 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Panel not disabling ??

Hi there, I have put some web controls, textboxes and drop down lists, in a
Panel, so that under a certain condition i can disable all fields for input.
I read in Help that disabling a Panel control (enabled=false) will disable
all child controls within it - just what i want. but it just doesnt work.
panMyPanel.Enab led=false; does absolutely nothing. panMyPanel.Visi ble=false
does hide the whole section, so i know i'm referencing it properly. Why wont
Enabled work? It is not within a datagrid or repeater or anything just in the
form tag. Do I really have to iterate through panMyPanel.Cont rols (i may
aswell not use the panel)

Thanks
Nov 19 '05 #1
4 2250
I have tested now also. Its working properly for me. Which browser are you
working on. It will not work in downlevel browser. For more detail, refer
this link.
http://msdn.microsoft.com/library/de...abledtopic.asp

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:78******** *************** ***********@mic rosoft.com...
Hi there, I have put some web controls, textboxes and drop down lists, in a Panel, so that under a certain condition i can disable all fields for input. I read in Help that disabling a Panel control (enabled=false) will disable
all child controls within it - just what i want. but it just doesnt work.
panMyPanel.Enab led=false; does absolutely nothing. panMyPanel.Visi ble=false does hide the whole section, so i know i'm referencing it properly. Why wont Enabled work? It is not within a datagrid or repeater or anything just in the form tag. Do I really have to iterate through panMyPanel.Cont rols (i may
aswell not use the panel)

Thanks

Nov 19 '05 #2
Well I'm stumped then! I'm using IE6. It just ignores the command completely.
Looks like i'll have to iterate through and disable individually.
:o(

incidentally, converting Control to webcontrol in panMyPanel.Cont rols
returns an error (invalid cast). How do you say for all webcontrols in a
panel? (i really dont want to say for all where name=textbox, dropdown, etc,
painful)

"Saravana" wrote:
I have tested now also. Its working properly for me. Which browser are you
working on. It will not work in downlevel browser. For more detail, refer
this link.
http://msdn.microsoft.com/library/de...abledtopic.asp

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:78******** *************** ***********@mic rosoft.com...
Hi there, I have put some web controls, textboxes and drop down lists, in

a
Panel, so that under a certain condition i can disable all fields for

input.
I read in Help that disabling a Panel control (enabled=false) will disable
all child controls within it - just what i want. but it just doesnt work.
panMyPanel.Enab led=false; does absolutely nothing.

panMyPanel.Visi ble=false
does hide the whole section, so i know i'm referencing it properly. Why

wont
Enabled work? It is not within a datagrid or repeater or anything just in

the
form tag. Do I really have to iterate through panMyPanel.Cont rols (i may
aswell not use the panel)

Thanks


Nov 19 '05 #3

Private Sub DisableControl( c as WebControl)
c.Enabled=flase
dim cc as WebControl
for each cc in c.Controls
DisableControl( cc)
next
End Sub

Then Call DisableControl( panelX)
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:78******** *************** ***********@mic rosoft.com...
Hi there, I have put some web controls, textboxes and drop down lists, in a Panel, so that under a certain condition i can disable all fields for input. I read in Help that disabling a Panel control (enabled=false) will disable
all child controls within it - just what i want. but it just doesnt work.
panMyPanel.Enab led=false; does absolutely nothing. panMyPanel.Visi ble=false does hide the whole section, so i know i'm referencing it properly. Why wont Enabled work? It is not within a datagrid or repeater or anything just in the form tag. Do I really have to iterate through panMyPanel.Cont rols (i may
aswell not use the panel)

Thanks

Nov 19 '05 #4
Thanks guys, i have used iteration for now to disable all the web controls.

if there are any Microsoft Officials who can explain why Panel.Enabled=f alse
isnt disabling its child controls (as indicated in msdn help), can you please
let me know. Many thanks.

"David Jessee" wrote:

Private Sub DisableControl( c as WebControl)
c.Enabled=flase
dim cc as WebControl
for each cc in c.Controls
DisableControl( cc)
next
End Sub

Then Call DisableControl( panelX)
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:78******** *************** ***********@mic rosoft.com...
Hi there, I have put some web controls, textboxes and drop down lists, in

a
Panel, so that under a certain condition i can disable all fields for

input.
I read in Help that disabling a Panel control (enabled=false) will disable
all child controls within it - just what i want. but it just doesnt work.
panMyPanel.Enab led=false; does absolutely nothing.

panMyPanel.Visi ble=false
does hide the whole section, so i know i'm referencing it properly. Why

wont
Enabled work? It is not within a datagrid or repeater or anything just in

the
form tag. Do I really have to iterate through panMyPanel.Cont rols (i may
aswell not use the panel)

Thanks


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4485
by: R6_2003 | last post by:
Hello all, i dunno if that's the right newsgroup to ask, but i'll try, please ignore me if u feel its not 0:) i've been messing with a control panel app for so long.. previously i was using Microsoft Visual C++ 6 and had ZERO problems, but now at work we switched to Borland C++ 6.0. The control panel applet i did contains a simple form with a
0
937
by: louise raisbeck | last post by:
Hi, I have a form which can be in edit or read mode. I did this form before i discovered edit and item index of datagrids though so have to stick with a straight entry form, and disabling the web controls. I was going to loop through every web control but then i discovered Panels and read, in the MSDN help, that setting enabled to false would disable all the controls within a panel, and got quite excited. But I set ...
3
1604
by: PB | last post by:
What is the rationalle for disabling JavaScript. AFAIK, the primary reason is for "security purposes" - but what specific kind of threats does the protect against? AND - is the disabling of JavaScript something that is done very much? I know it's impossible to answer that last question definitively - so I'm wondering if it has presented any of you with any real problems in the day-to-day running of your Web applications (i.e. support...
9
3172
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected... So the behavour is similar to a tab control. The user is expected to fill out required data on each of the panels before pressing a submit button which is visible from all panels. Problem I have is validating the data entered by the user. I...
3
5018
by: pealy2 | last post by:
Sorry if this is in the wrong group, I've searched long & hard without finding anything even slightly useful. (recommendations for a more relevant group gratefuly received) I need to change the settings for the default web service user account so that sounds go through a sound card rather than the on-board sound. I can do this simply when I'm logged in to my own user account by going through control panel. If I can't log on as the Web...
12
2246
by: Nalaka | last post by:
Hi, I suddenly started getting a lot of errors from html validation (some CSS) so I followed the following instructions to disable it. If you'd rather not have these types of HTML validation errors show up in your error-list, you can disable this functionality by selecting the Tools->Options menu item in VS or Visual Web Developer. Select the TextEditor->Html->Validation tree option in the left-hand side of the
2
1041
by: ravidhixith | last post by:
Hi there, I am trying hard get a sloution to an issue.It goes like this I want to show a "Searching plz wait messge " when user searches for some values.i tried different ways but am failed. i tried using <div>=failed using showmodelessdialogbox()=fsiled finally i am using timer control on time elapsed event i am writing the code for getting the serach results,prior in page load i am just showing a panel which has searching message and...
1
2553
by: =?Utf-8?B?RGF2aWQgQWJpdGJvbA==?= | last post by:
Hi everybody, I have a panel which of course contains controls of course. It is set to autoscroll. Problem is if the panel is disabled, the scrollbar shows up but it dows not respond to the mouse scrolling button. Only when it's enabled does it work. Any ideas? Thanks,
1
4838
by: mbruyns | last post by:
i have been trying (and sometimes succeeding) to use the modalpopupextender to show various panels of controls on my asp pages. the strange problem that i keep on running into is that sometimes it works, displaying an awesome popup, while other times, it doesn't show a popup at all, but rather just page posts back and the panel becomes visible at the bottom of the page (where it is situated in the designer). what is even stranger to me is that...
0
7934
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8236
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8362
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7992
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8225
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5732
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3891
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1465
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.