all groups > asp.net datagrid control > may 2004 >
You're in the

asp.net datagrid control

group:

Multiple Rows - BoundColumn/TemplateColumn



Multiple Rows - BoundColumn/TemplateColumn pdaniel NO[at]SPAM commonwealth.com
5/25/2004 3:04:36 PM
asp.net datagrid control: I have a datagrid that I need to display the data that is bound to it
in 2 lines (see below)

(line 1)Account 345345435 - Smith Brokerage
(line 2)Buy IBM 12 @ 34.987 12/23/2004

I have tried placing a datagrid within the parent grid, I have tried
placing <br> tags in the code. I'm just not sure where to start. I
would like to wrap the TemplateColumn onto the next line and still
have the grid treat it as one line for highlighting purposes, etc.
Here's the html code:

<Columns>
<asp:BoundColumn DataField="dtTradeDate" HeaderText="Trade Date"
DataFormatString="{0:d}">
<ItemStyle Width="70px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="EntryType" HeaderText="Entry Type">
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Description" HeaderText="Description">
<ItemStyle Width="170px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Amount" HeaderText="Amount / Price"
DataFormatString="${0:N2}">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right" Width="80px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Quantity" HeaderText="Quantity"
DataFormatString="{0:N2}">
<HeaderStyle HorizontalAlign="Right"></HeaderStyle>
<ItemStyle HorizontalAlign="Right" Width="75px"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn ItemStyle-Wrap="True">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "vchAccountID") %>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>

Any thoughts/suggestions would be greatly appreciated!!

Thanks,
RE: Multiple Rows - BoundColumn/TemplateColumn Phil
8/1/2004 6:01:02 PM
I would love to know how to do this also,

Did you ever find out? Does anybody know or have any pointers.

Thanks,
Phil.


[quoted text, click to view]
AddThis Social Bookmark Button