DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 9 Aug 2007 12:53:50 -0500,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    TS am
          2    Eliyahu Goldin
                 3    (Steven Cheng[MSFT])
                        4    TS am
                        5    (Steven Cheng[MSFT])
                        6    (Steven Cheng[MSFT])


ColGroup for a table element gets lost when the table element is made visible/invisible   
I am losing my colgroup html element of a table that i toggle back and forth
of being visible=true/false. is there any workaround since the rendered html
doesn't contain it even though it has not been explicitely been made
invisible?

note also that even when the table is made visible=true, colgroup still
doesn't show up
Date:Thu, 9 Aug 2007 12:53:50 -0500   Author:  

Re: ColGroup for a table element gets lost when the table element is made visible/invisible   
What is the meaning of colgroup with visible=false? What exactly do you want
to achieve? Just note that server controls with visible=false don't render
to the client and don't come back in postbacks.

-- 
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


"TS" <manofsteele1@nospam.nospam> wrote in message
news:%23Fj%23%234q2HHA.4184@TK2MSFTNGP06.phx.gbl...

> I am losing my colgroup html element of a table that i toggle back and
forth
> of being visible=true/false. is there any workaround since the rendered
html
> doesn't contain it even though it has not been explicitely been made
> invisible?
>
> note also that even when the table is made visible=true, colgroup still
> doesn't show up
>
>
Date:Fri, 10 Aug 2007 00:02:29 +0200   Author:  

Re: ColGroup for a table element gets lost when the table element is made visible/invisible   
Hi TS,

From your description, you're using some ASP.NET Table control in aspx 
page(is it asp:Table or  html table control?) and you found that the 
<colgroup> defined in table will not display after you've ever set Table 
control's Visible to "false" ,correct?

As for the <colgroup> since it is html snippet, how did you insert into the 
server  control? Are you using the <asp:Table> server control or <table 
runat="server" > html server control?  Based on my experience, it is 
recommended to use html server control if you want to deal with some pure 
html fragment or some html specific attrribute or style settings on the 
control. Also, for "Visible" property, as "Eliyahu" said, if you set server 
control's "Visible" to "false", ASP.NET won't render it in the output html. 
So I suggest you consider use the css style "display" attribute to hide a 
control. e.g.

===============
 <table id="tb1" runat="server" style="display:none">
  <colgroup></colgroup>
  <colgroup style="background-color:Yellow"></colgroup>
   <tr>
   
    <td>aaaa</td>
   <td>bbbb</td> 
   </tr>
     <tr>
   
    <td>cccc</td>
   <td>dddd</td> 
   </tr>
   </table>
===============

You can set html table control's "display" style to "none" and change it in 
either server-side ASP.NET code or client-side javascript code.

Of course, if convenient, you can post some code snippet so that we can 
also have a look into it. If there is anything we missed, please feel free 
to post here also.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

 

==================================================

Get notification to my posts through email? Please refer to 
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

 

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues 
where an initial response from the community or a Microsoft Support 
Engineer within 1 business day is acceptable. Please note that each follow 
up response may take approximately 2 business days as the support 
professional working with you may need further investigation to reach the 
most efficient resolution. The offering is not appropriate for situations 
that require urgent, real-time or phone-based interactions or complex 
project analysis and dump analysis issues. Issues of this nature are best 
handled working with a dedicated Microsoft Support Engineer by contacting 
Microsoft Customer Support Services (CSS) at 
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================
 	

This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Fri, 10 Aug 2007 03:35:17 GMT   Author:  

Re: ColGroup for a table element gets lost when the table element is made visible/invisible   
hi, I am using html table control with runat=server. Actually the issue is
when i first set the table to invisible, then to visible - the colgroup
doesn't appear. If i wrap the table inside another container control
(another html table) and set it to invisible then visible it works fine.
seems like the colgroup element gets dropped.

"Steven Cheng[MSFT]"  wrote in message
news:Q7ASA%23v2HHA.4100@TK2MSFTNGHUB02.phx.gbl...

> Hi TS,
>
> From your description, you're using some ASP.NET Table control in aspx
> page(is it asp:Table or  html table control?) and you found that the
> <colgroup> defined in table will not display after you've ever set Table
> control's Visible to "false" ,correct?
>
> As for the <colgroup> since it is html snippet, how did you insert into
the
> server  control? Are you using the <asp:Table> server control or <table
> runat="server" > html server control?  Based on my experience, it is
> recommended to use html server control if you want to deal with some pure
> html fragment or some html specific attrribute or style settings on the
> control. Also, for "Visible" property, as "Eliyahu" said, if you set
server
> control's "Visible" to "false", ASP.NET won't render it in the output
html.
> So I suggest you consider use the css style "display" attribute to hide a
> control. e.g.
>
> ===============
>  <table id="tb1" runat="server" style="display:none">
>   <colgroup></colgroup>
>   <colgroup style="background-color:Yellow"></colgroup>
>    <tr>
>
>     <td>aaaa</td>
>    <td>bbbb</td>
>    </tr>
>      <tr>
>
>     <td>cccc</td>
>    <td>dddd</td>
>    </tr>
>    </table>
> ===============
>
> You can set html table control's "display" style to "none" and change it
in
> either server-side ASP.NET code or client-side javascript code.
>
> Of course, if convenient, you can post some code snippet so that we can
> also have a look into it. If there is anything we missed, please feel free
> to post here also.
>
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead
>
>
>
> ==================================================
>
> Get notification to my posts through email? Please refer to
>

http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif

> ications.
>
>
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
>
> ==================================================
>
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
>
>
>
Date:Mon, 13 Aug 2007 11:05:27 -0500   Author:  

Re: ColGroup for a table element gets lost when the table element is made visible/invisible   
Hi TS,

Thanks for your reply and the further description.

I have performed some further tests on this and did find the behavior you 
encounter. Actually, this behavior as below:

** as long as you mark the html <table> as "runat=server", it will ignore 
any "<colgroup> elements nesteed in it.
** if you remove the "runat=server", make it a pure html element, it can 
work correctly with <colgroup> or other complex table settings

And this is due to the design limitation of htmltable server control. You 
can also find the description on this in the MSDN document of htmltable 
class:

#HtmlTable Class(in the Note section)
http://msdn2.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmltabl
e(VS.80).aspx

Therefore, for your scenaro here, I think your current solution that use a 
container server control to wrapper the pure html <table> element should be 
the reasonable approach.  

If you have any further questions on this, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Tue, 14 Aug 2007 05:31:02 GMT   Author:  

Re: ColGroup for a table element gets lost when the table element is made visible/invisible   
Hi TS,

Does the further information helps you some? If there is still anything 
need help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Thu, 16 Aug 2007 11:26:25 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us