473,327 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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.Enabled=false; does absolutely nothing. panMyPanel.Visible=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.Controls (i may
aswell not use the panel)

Thanks
Nov 19 '05 #1
4 2232
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.microsoft.com> wrote in
message news:78**********************************@microsof t.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.Enabled=false; does absolutely nothing. panMyPanel.Visible=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.Controls (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.Controls
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.microsoft.com> wrote in
message news:78**********************************@microsof t.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.Enabled=false; does absolutely nothing.

panMyPanel.Visible=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.Controls (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.microsoft.com> wrote in
message news:78**********************************@microsof t.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.Enabled=false; does absolutely nothing. panMyPanel.Visible=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.Controls (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=false
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.microsoft.com> wrote in
message news:78**********************************@microsof t.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.Enabled=false; does absolutely nothing.

panMyPanel.Visible=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.Controls (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
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...
0
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...
3
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...
9
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......
3
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...
12
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...
2
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...
1
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...
1
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.