First of all let me know that the CSS Control Adapters is a really good idea ...
ASP.NET renders poorly some of their controls and not CSS friendly ... so surprise that. Just see IE6 ...
The problem is that CSS Control Adapters has many problems.
Try this, that I am trying for days:
Create a GridView (Table) and try to set 1 column with fixed width and the others expanded.
HeaderStyle.Width does not work.
HeaderStyle.CssClass does not work.
Any sugestion?
Other project that I think is great is AJAX Control Toolkit. But in 1 month I already found and reported 4 bugs.
I love ASP.NET but sometimes I get so frustrated with the render problems and bugs that I start thinking in moving for new technologies out there as Ruby.
The CSS adapters is an open source project. Microsoft developed the initial product then released it to the community to further develop and manage. You are welcome to contribute fixes and updates to it at the CodePlex site, http://www.codeplex.com/cssfriendly
The intention behind the CSS adapters is that you will control all presentation through CSS. Thus, HeaderStyle.Width is superfluous, which is why the adapters throw it away and don't use it to set width. I understand your concern regarding HeaderStyle.CssClass,
as that seems like something the adapters should include.
Check the class name on your GridView in the actual source produced (something like .AspNet-GridView), then set the width that way using CSS.
.AspNet-GridView th
{
width: 500px;
}
.AspNet-GridView th + th
{
width: auto;
}
That should accomplish what you're wanting to do (first column being some fixed width and the rest taking up as much as space as they need). The only rub is that the adjacent sibling selector doesn't work in IE6, iirc, so you'd have to figure out something
else for that browser. You may also have to change settings on the table row.
When you use the CSS Adapters, the grid will look differently than without CSS Adapters because you must also add CSS styles. The CSS Adapters do not inject inline styles like this
they add CSS "hooks" that you can use in your CSS file to style elements of the table. Hooks would be extra classes and IDs in the xhtml that allow CSS styling, such as
<li class="AspNet-Menu-Leaf">
This list element can be styled in the CSS file in this manner...
shapper
Contributor
3932 Points
3789 Posts
CSS Control Adapters Sucks ... What is going on?
Nov 14, 2007 12:29 PM|LINK
Hello,
First of all let me know that the CSS Control Adapters is a really good idea ...
ASP.NET renders poorly some of their controls and not CSS friendly ... so surprise that. Just see IE6 ...
The problem is that CSS Control Adapters has many problems.
Try this, that I am trying for days:
Create a GridView (Table) and try to set 1 column with fixed width and the others expanded.
HeaderStyle.Width does not work.
HeaderStyle.CssClass does not work.
Any sugestion?
Other project that I think is great is AJAX Control Toolkit. But in 1 month I already found and reported 4 bugs.
I love ASP.NET but sometimes I get so frustrated with the render problems and bugs that I start thinking in moving for new technologies out there as Ruby.
Thanks,
Miguel
bdemarzo
Member
435 Points
168 Posts
Re: CSS Control Adapters Sucks ... What is going on?
Nov 15, 2007 01:08 PM|LINK
The CSS adapters is an open source project. Microsoft developed the initial product then released it to the community to further develop and manage. You are welcome to contribute fixes and updates to it at the CodePlex site, http://www.codeplex.com/cssfriendly
- blog: www.sidesofmarch.com
Falcon
Member
96 Points
35 Posts
Re: CSS Control Adapters Sucks ... What is going on?
Nov 20, 2007 07:31 PM|LINK
The intention behind the CSS adapters is that you will control all presentation through CSS. Thus, HeaderStyle.Width is superfluous, which is why the adapters throw it away and don't use it to set width. I understand your concern regarding HeaderStyle.CssClass, as that seems like something the adapters should include.
Check the class name on your GridView in the actual source produced (something like .AspNet-GridView), then set the width that way using CSS.
.AspNet-GridView th
{
width: 500px;
}
.AspNet-GridView th + th
{
width: auto;
}
That should accomplish what you're wanting to do (first column being some fixed width and the rest taking up as much as space as they need). The only rub is that the adjacent sibling selector doesn't work in IE6, iirc, so you'd have to figure out something else for that browser. You may also have to change settings on the table row.
camera
Member
159 Points
44 Posts
Re: CSS Control Adapters Sucks ... What is going on?
Dec 14, 2007 07:50 PM|LINK
When you use the CSS Adapters, the grid will look differently than without CSS Adapters because you must also add CSS styles. The CSS Adapters do not inject inline styles like this
< td style="width:400px; font-family:arial; color:green">
they add CSS "hooks" that you can use in your CSS file to style elements of the table. Hooks would be extra classes and IDs in the xhtml that allow CSS styling, such as
<li class="AspNet-Menu-Leaf">
This list element can be styled in the CSS file in this manner...
li.AspNet-Menu-Leaf { font-weight: bold; background-color: yellow; }
This post on CSS Specificity might help.
VeganMan
Member
82 Points
138 Posts
Re: CSS Control Adapters Sucks ... What is going on?
May 01, 2009 05:15 AM|LINK
2009 and they still suck
senthilkumar...
Member
25 Points
45 Posts
control Adapter for calender control
May 15, 2009 04:31 AM|LINK
Hi all,
in our company we r developing site using <div> tag full and fully,the thing that i have the search page that uses calender control
calender control bascially render as table so ,i need a adopter for that calender
any one pls suggest me ,it is very urgent