Before this whole thing gets set in stone, you should consider using DL, DT and DD for the FormView and DetailsView adapters. This would enable a much better match to the styling rules, not requiring two entirely different CSS classes for the "label" and
field "values". Instead, you map DT to the overall view, then DT for the label and DD for the field value. These tags have been around since HTML 2.0, so they are well supported. I'm using this pattern (with much fewer classes required):
In situations where you have more than one value per record (i.e., you end up with more than one dd per dt, I found I couldn't create CSS that would cause the dt and all its dd tags to render on the same horizontal line in the browser. Can you suggest how
you would create CSS rules that would handle this?
Generally, I like the dl, dt, dd solution in simple cases where you have just one value per record (plus its title) but the multi-value case is a problem.
Remember that, unlike the native rendering of dl/dt/dd, the DetailsView wants to put each record on the same line, not stacked vertically with the dt above its dd value (which is what appears if you don't style them at all).
IDisposable: one point of this kit was for peopel to build even more adapters for lots of different purposes -- why don't you share the code for your <dl><dt><dd> implementation? I'm sure people would love it and then there would be more choice out there.
Laurent posted about a great mod for doing selections on the menu control, there is a lot of potential to grow an amazing set of community built adapters.
Just my take :) and my goal for this whole project.
Thanks,
Brian
---------------------------
Brian Goldfarb [MS]
Group Product Manager
UX Platform and Tools Strategy
Member
10 Points
37 Posts
Very cool!
Apr 30, 2006 12:18 AM|IDisposable|LINK
Before this whole thing gets set in stone, you should consider using DL, DT and DD for the FormView and DetailsView adapters. This would enable a much better match to the styling rules, not requiring two entirely different CSS classes for the "label" and field "values". Instead, you map DT to the overall view, then DT for the label and DD for the field value. These tags have been around since HTML 2.0, so they are well supported. I'm using this pattern (with much fewer classes required):
Member
290 Points
741 Posts
Re: Very cool!
May 01, 2006 09:23 AM|Russ Helfand|LINK
In situations where you have more than one value per record (i.e., you end up with more than one dd per dt, I found I couldn't create CSS that would cause the dt and all its dd tags to render on the same horizontal line in the browser. Can you suggest how you would create CSS rules that would handle this?
Generally, I like the dl, dt, dd solution in simple cases where you have just one value per record (plus its title) but the multi-value case is a problem.
Remember that, unlike the native rendering of dl/dt/dd, the DetailsView wants to put each record on the same line, not stacked vertically with the dt above its dd value (which is what appears if you don't style them at all).
Thoughts?
-Russ-
Groovybits.com
Member
10 Points
37 Posts
Re: Very cool!
May 01, 2006 09:03 PM|IDisposable|LINK
Just float:left the dd's in css
<html>
<head>
<style>
.Odd
{
background:red;
}
.Even
{
background:green;
}
.AspNet-DetailsView dt
{
clear:left;
}
.AspNet-DetailsView dd
{
float:left;
}
.AspNet-DetailsView dd
{
float:left;
}
</style>
</head>
<body>
<div class="PrettyDetailsView">
<div class="AspNet-DetailsView">
<div class="AspNet-DetailsView-Header">
Author Details
</div>
<dl>
<dt class="Odd">ID</dt>
<dd class="Odd">998-72-3567</dd>
<dt class="Even">Last name</dt>
<dd class="Even">Ringer</dd>
<dd class="Even">Dinger</dd>
</dl>
<div class="AspNet-DetailsView-Footer">
</div>
<div class="AspNet-DetailsView-Pagination">
<span class="AspNet-DetailsView-ActivePage">1</span><a class="AspNet-DetailsView-OtherPage" href="#2">2</a>
</div>
</div>
</div>
</body>
</html>
Member
10 Points
2096 Posts
Re: Very cool!
May 02, 2006 06:47 AM|nokiko|LINK
just remmeber to put a <div stly="clear:both;"></div> directly afher the place where you call your control
<div>
call control here
<div stly="clear:both;"></div>
</div>
Member
38 Points
74 Posts
Microsoft
Re: Very cool!
May 02, 2006 09:43 PM|bgold|LINK
Laurent posted about a great mod for doing selections on the menu control, there is a lot of potential to grow an amazing set of community built adapters.
Just my take :) and my goal for this whole project.
Thanks,
Brian
Brian Goldfarb [MS]
Group Product Manager
UX Platform and Tools Strategy
Member
10 Points
13 Posts
Re: Very cool!
May 10, 2009 08:45 PM|dx68|LINK
I want to use that tags into my web pages.. you should share your code??
Regards
Diego G.