Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

Table Rendering Issue? Options
Constructor
Posted: Saturday, February 21, 2009 1:08:00 PM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
This one is really buggin' me.

I have a simple GridView:

Code:
(asp:GridView ID="gvSiteCatalogs" runat="server" CellSpacing="-1" GridLines="None" DataKeyNames="ID" AutoGenerateColumns="False" onselectedindexchanged="gvSiteCatalogs_SelectedIndexChanged")etc......


This renders as:

Code:
(table cellspacing="0" rules="all" border="1" id="p_gvSiteCatalogs" style="border-collapse:collapse;")etc......


I do not want border="1".
I can not get rid of border="1".

This is in the module admin.

WHY!!! happy
martijnb
Posted: Saturday, February 21, 2009 3:03:41 PM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
I don't know. In my experience, if you drop a gridview on a form without setting any property, it renders as a pretty clean table.

The guys at forums.asp.net probably know the answer.
Constructor
Posted: Sunday, February 22, 2009 2:39:37 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
Ok, I had a look around and tried eveything I could find. Nothing has worked.

I realised that in past projects I have always used Css Control Adapters (now seems to be @ on code.google)

So now I am looking at this. Why MS do this I can not fathom.

Render the tag clean?
Difficult?
(/complaining)
happy
Constructor
Posted: Sunday, February 22, 2009 3:04:19 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
BEAUTIFUL!

I have added this to my custom solution and it works perfectly (so far wink )

1) Download this: http://www.codeplex.com/cssfriendly/SourceControl/ListDownloadableCommits.aspx (the latest one)

2) Build it as 'release' and add the 'CSSFriendly.dll' to the webs '/bin' folder

3) Copy the 'App_Browsers' folder to the 'Cuyahoga.Web' directory within your solution.

4) Rebuild the solution.

5) Check your html output. Brilliant! Clean!

I added the CSSFriendly solution to my customised Cuyahoga solution, put in build events to the correct '/bin'. Now I have full control over the html output over all controls.

The output from the solution is now CSSFriendly and clean and there is fine-grained control over html output.

Bonus points, I am happy happy
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.