473,835 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ColGroup for a table element gets lost when the table element is made visible/invisible

TS
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
Aug 9 '07 #1
4 3221
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" <ma**********@n ospam.nospamwro te in message
news:%2******** ************@TK 2MSFTNGP06.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


Aug 9 '07 #2
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
<colgroupdefine d in table will not display after you've ever set Table
control's Visible to "false" ,correct?

As for the <colgroupsinc e it is html snippet, how did you insert into the
server control? Are you using the <asp:Tableserve r 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="backgrou nd-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/subscripti...ult.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/subscripti...t/default.aspx.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 10 '07 #3
TS
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]" <st*****@online .microsoft.comw rote in message
news:Q7******** ********@TK2MSF TNGHUB02.phx.gb l...
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
<colgroupdefine d in table will not display after you've ever set Table
control's Visible to "false" ,correct?

As for the <colgroupsinc e it is html snippet, how did you insert into
the
server control? Are you using the <asp:Tableserve r 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="backgrou nd-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/subscripti...ult.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/subscripti...t/default.aspx.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.
>


Aug 13 '07 #4
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.

Aug 16 '07 #5

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

Similar topics

1
9536
by: Daniel Haude | last post by:
Me again! This time I'd like to prevent an entire column of a table to have no word-wrapping. So I defined this class in the style sheet: ..nobr { white-space: nowrap; } When I define table cells like this: <td class="nobr"> everything works
10
26883
by: john T | last post by:
Is there anyway to vertically center a html table using css in such a way it does not alter the html table. When I tryied it just screws up.
1
1933
by: liberty | last post by:
Hi, I have looked everywhere to try and solve my problem-- looked at W3C DOM Compatibility charts, read articles, tried debuggers, and still my script is not working. The problem I have is this. I am working on a script that dynamically generates maps with research sites that show up when selected from a pulldown list. The sites show up in every browser except for Safari, and I can't figure out why. I have made a simple function that...
1
2017
by: andrewkooi | last post by:
Greetings, I have 16 links for my horizontal menu navigation as you can see in my website www.singakad.com and at present, I am using a table and javascript for this menu. Is it possible for me to create a submenu for certain cells in this horizontal menu? How do I go about doing this? Thank you in advance for any assistance given.
2
1697
by: Jure Erznoznik | last post by:
I made a table that shows 20 rows of a table at a time. When the user presses down or up arrow, the table will scroll as necessary filling new rows. But I have a problem with the following code snippet: while (tr.sectionRowIndex < this.scrollRowsVisible && this._DBCacheS > 0) { //Scroll Up // this.tBody.removeChild(this._DBRowCache.element); this.tBody.deleteRow(-1);
0
1263
by: aeshtry | last post by:
Hello dear friends I have an urgent question. Would you please give me your professional idea? I have an html table containing the ASP.Net validation summary and an ASP.Net label control. The table background has different color than other sections. I want to show the error message inside a section (with different background color) only when an error occurred. This error can be a validation client error (generated by validation controls...
33
18655
by: David Stone | last post by:
Been trying to specify text alignment within specific columns in an html 4 strict page. According to the w3c specs, <TABLE border="1"> <COLGROUP> <COL> <COL align="char" char="."> </COLGROUP>
36
5130
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT do so, since this is not part of the specification. How then to you apply styles to entire columns? Surely you don't have to write <td class="behold"on every row item.
2
1228
by: PrakashN | last post by:
Hi, By default Div element is invisible. Clicking on label it made as visible. i have textbox fields in div element.. while server side validation i want to make div element as visible.. but in postback it again made as invisible.. but it should be visible for me.. Help me.. thanks & regards prakash
0
9653
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10815
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
10526
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
10563
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
9348
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7770
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
6970
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4435
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3094
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.