|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Enabling/diusabling child controlsHi,
I have got a child control within a parent control. If i disable my child control but enable my parent control , does it cause the pchild control to stay enabled? Example:- I have got a checkboxlist web control within a table control and I have set the Enabled property to false but the table is Enabled. This is causing my checkboxlist control to stay enabled. Any suggestions? Regards, Summit Are you using .NET framework 1.0? And are you testing this with a browser
other than IE? The .NET framework 1.0 has a know bug in the CheckBoxList control which seems to have been fixed in 1.1. HTH, Axel Dahmen -------------------- Show quoteHide quote "Summit" <Sum***@discussions.microsoft.com> schrieb im Newsbeitrag news:0FF63513-E40F-4D83-9194-C98FFF376390@microsoft.com... > Hi, > > I have got a child control within a parent control. If i disable my child > control but enable my parent control , does it cause the pchild control to > stay enabled? > > Example:- I have got a checkboxlist web control within a table control and I > have set the Enabled property to false but the table is Enabled. This is > causing my checkboxlist control to stay enabled. > > Any suggestions? > > Regards, > Summit No,
I am using .NEt 1.1 . Maybe I should elaborate on what I am doing. I have got a checkboxlist control which I place it in a table control(for indenting). If I set my enabled property of the checkboxlist control to false, but leave the table cntrol to disabled= false, it keeps the checkboxlist control to enabled. So that fact that I am trying to disable my checkboxlist has got absolutely no effect on it. I had a look at the html that it renders and I could see no signs of any "diabled" property being set. However, if I set the table.Enabled property(which is hosting the checkboxlist ) to false, it disables the checkboxlist control. Any idea what's going on here? Regards, Summit Show quoteHide quote "Axel Dahmen" wrote: > Are you using .NET framework 1.0? And are you testing this with a browser > other than IE? > > The .NET framework 1.0 has a know bug in the CheckBoxList control which > seems to have been fixed in 1.1. > > HTH, > Axel Dahmen > > -------------------- > "Summit" <Sum***@discussions.microsoft.com> schrieb im Newsbeitrag > news:0FF63513-E40F-4D83-9194-C98FFF376390@microsoft.com... > > Hi, > > > > I have got a child control within a parent control. If i disable my > child > > control but enable my parent control , does it cause the pchild control to > > stay enabled? > > > > Example:- I have got a checkboxlist web control within a table control and > I > > have set the Enabled property to false but the table is Enabled. This is > > causing my checkboxlist control to stay enabled. > > > > Any suggestions? > > > > Regards, > > Summit > > > Ah, I see... so you are using CLIENT-side HTML for the table and SERVER-side
controls for the Checkboxlist... If that is the case, you have made two mistakes: First, a HTML table element doesn't actually have a "disabled" attribute as it is not an input element. So, in fact, what you did is having created invalid HTML. Next, the Enabled property of server-side controls is solely interpreted by ASP.NET and used when rendering controls into HTML. BUT to have ASP.NET consider the table's Enabled property, this table has to be declared having the Runat attribute set to "server". After doing that you need to set the Enabled property in code, as still the HTML table element doesn't provide an Enabled property, yet the associated C#/VB object does. Keep me informed if you have any questions left. HTH, Axel Dahmen ----------- Show quoteHide quote "Summit" <Sum***@discussions.microsoft.com> schrieb im Newsbeitrag news:4FD95545-23A0-48BD-89AD-8C934601F094@microsoft.com... > No, > > I am using .NEt 1.1 . Maybe I should elaborate on what I am doing. > > I have got a checkboxlist control which I place it in a table control(for > indenting). > > If I set my enabled property of the checkboxlist control to false, but leave > the table cntrol to disabled= false, it keeps the checkboxlist control to > enabled. So that fact that I am trying to disable my checkboxlist has got > absolutely no effect on it. > > I had a look at the html that it renders and I could see no signs of any > "diabled" property being set. > > However, if I set the table.Enabled property(which is hosting the > checkboxlist ) to false, it disables the checkboxlist control. > > Any idea what's going on here? > > Regards, > Summit > > "Axel Dahmen" wrote: > > > Are you using .NET framework 1.0? And are you testing this with a browser > > other than IE? > > > > The .NET framework 1.0 has a know bug in the CheckBoxList control which > > seems to have been fixed in 1.1. > > > > HTH, > > Axel Dahmen > > > > -------------------- > > "Summit" <Sum***@discussions.microsoft.com> schrieb im Newsbeitrag > > news:0FF63513-E40F-4D83-9194-C98FFF376390@microsoft.com... > > > Hi, > > > > > > I have got a child control within a parent control. If i disable my > > child > > > control but enable my parent control , does it cause the pchild control to > > > stay enabled? > > > > > > Example:- I have got a checkboxlist web control within a table control and > > I > > > have set the Enabled property to false but the table is Enabled. This is > > > causing my checkboxlist control to stay enabled. > > > > > > Any suggestions? > > > > > > Regards, > > > Summit > > > > > >
Other interesting topics
CreateChildControls() always returns default property values
detailsview, 3-Tier Binding Problem ????????? Menu Control Input fields are renamed with runat="server", how do I change it DataGrid dynamic columns / firing events button's OnClick event runs after page databinding... Accessing Datagrid Cells on OnClick Postback Problem Retrieving Values from CheckboxList nested inside Datalist Control Where is the onclick event? |
|||||||||||||||||||||||