Zach said:
I've never done it but I'd suspect that you could use an item template
column and then just put the following code in there:
<ItemTemplate>
<asp:Label id=Label1
runat="server"
Text='<%# DataBinder.Eval(Container.DataItem, "FieldName1") %>'>
</asp:Label>
<asp:Label id=Label1
runat="server"
Text='<%# DataBinder.Eval(Container.DataItem, "FieldName2") %>'>
</asp:Label>
</ItemTemplate>
While this will definitely display two records in one table row, it will
not generate the HTML the original poster was interested in. Namely, it
won't necessarily have the second Label's value line up in each row, as
it would with the desired HTML provided originally.
To get the HTML rendered as specified in the original post, one would
need to use a DataList with RepeatColumns set to 2, or a Repeater,
generating the apporpriate HTML markup.
To learn more about the three Data Web controls check out:
Deciding When to Use the DataGrid, DataList, or Repeater
http://msdn.microsoft.com/library/d...dnaspp/html/aspnet-whenusedatawebcontrols.asp
Or check out my book, ASP.NET Data Web Controls Kick Start
[
http://www.amazon.com/exec/obidos/ASIN/0672325012/4guysfromrollaco]
Happy Programming!
--
Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com
* When you think ASP, think 4GuysFromRolla.com!