here if you like to use datagrid to show many items in one column you have to
use Template column, that well be more easy when you add it from the property
builder of the datagrid and after that you right click on the datagrid and
choose edit tamplate so that will help you to see how you can edit it as you
like for that column. here i will send you the html code for a datagrid that
i used befor, so you can see in the last template column how to add more
controls at the same time.
<asp:datagrid id="DataGrid1" runat="server" DataKeyField="forum_ID"
BorderWidth="1px" BorderColor="Black"
AutoGenerateColumns="False" Width="100%">
<AlternatingItemStyle BackColor="White"></AlternatingItemStyle>
<ItemStyle BackColor="#CCCCFF"></ItemStyle>
<HeaderStyle Font-Italic="True" Font-Bold="True" ForeColor="White"
BackColor="#000066"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="Kategori">
<HeaderStyle Width="50%"></HeaderStyle>
<ItemTemplate>
<asp:LinkButton id=LinkButton2 runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.forum_adi") %>' Font-Bold="True"
Font-Italic="True" CommandName="forum_adi_link">
</asp:LinkButton><BR>
<asp:Label id=Label1 runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.forum_aciklama") %>' Font-Bold="True">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="mesaj_sayisi" HeaderText="Mesaj Sayısı">
<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
<ItemStyle Font-Bold="True" HorizontalAlign="Center"
VerticalAlign="Middle"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="cevap_sayisi" HeaderText="Cevap Sayısı">
<HeaderStyle HorizontalAlign="Center" Width="10%"></HeaderStyle>
<ItemStyle Font-Bold="True" HorizontalAlign="Center"
VerticalAlign="Middle"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="Son Gönderilen">
<HeaderStyle HorizontalAlign="Center" Width="30%"></HeaderStyle>
<ItemStyle Font-Bold="True" Wrap="False" HorizontalAlign="Center"
VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
<asp:HyperLink id=HyperLink2 runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.enbuyuk") %>'>
</asp:HyperLink>
<asp:ImageButton id="Imgbtnmsj" runat="server"
ImageUrl="images/msgyaz.gif"></asp:ImageButton><BR>
<asp:Label id="Label2" runat="server" Font-Bold="True">Gönderen
:</asp:Label>
<asp:HyperLink id=HyperLink3 runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.nick") %>' NavigateUrl='<%#
DataBinder.Eval(Container, "DataItem.forum_ID",
"Kategorigoster.aspx?forum_ID={0}") %>'>
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
--
PLEASE DO NOT FORGET TO RATE THE ANSWER
happy coding
Muhanad YOUNIS
MCSD.NET / MCT
[quoted text, click to view] "Owen Blacker" wrote:
> Bear with me, this query isn't fun.
>
> I'm building an e-commerce site and the Information Architecture for
> the
> Product Comparison page requires repeating horizontally:
>
>
> +----------+--------------+--------------+--------------+--------------+
> | | [Image] | [Image] | [Image] | [Image]
> |
> | | | | |
> |
> | | Product name | Product name | Product name | Product
> name |
> | | as hyperlink | as hyperlink | as hyperlink | as
> hyperlink |
> | | | | |
> |
> | | Price | Price | Price | Price
> |
> | | | | |
> |
> | | Description | Description | Description |
> Description |
>
> +----------+--------------+--------------+--------------+--------------+
> | Product specifications (colspanned)
> |
>
> +----------+--------------+--------------+--------------+--------------+
> | Weight | #### kg | #### kg | #### kg | #### kg
> |
>
> +----------+--------------+--------------+--------------+--------------+
> | Material | Blah blah | Blah blah | Blah blah | Blah blah
> |
>
> +----------+--------------+--------------+--------------+--------------+
> | Another | Blah blah | Blah blah | Blah blah | Blah blah
> |
> | detail | blah blah | blah blah | blah blah | blah blah
> |
>
> +----------+--------------+--------------+--------------+--------------+
>
> where the number of products being compared is variable. (To
> complicate
> matters further, I don't necessarily know what the row headers on the
> left
> are either, as they vary by product type, but that's another issue and
> isn't why I'm mailing the list.)
>
> Now the data need to be in a table, obviously, but can't be in more
> than
> one table, as that would completely destroy the accessibility of the
> page.
>
> I can't see how I could use a regular Repeater control, as the
> ItemTemplate
> can't contain <tr> or </tr> tags (which would cause each product-column
> to
> scroll *down* the page, rather than *across* it.
>
> I can't see how I could use a DataGrid, as the first row contains much
> more
> complex data (an image, a hyperlink, some text and so on).
>
> Does anyone have *any* ideas on how I might databind my source to
> *something*
> so this might work?
>
> All suggestions greatly appreciated. If people could cc: me on any
> replies,
> so I notice them that little quicker, that would be even better.
>
> Thanks, everyone,
>
>
> Owen Blacker
> --
> Owen Blacker
> Senior Software Developer
>
> Wheel: insight | thinking | creativity
>
> owen.blacker@wheel.co.uk
www.wheel.co.uk >