dataGrid with columns (more than 1 el. in a row)

G

Guest

is it possible to have a datagrid control render elements not in "single element => single row
way, but many (e.g 2) elements (ordered horizontally) per single row. I know that I can use dataList or data Repeate
to render custom HTML, however datagrid provides almost automatic paging functionality that i want to use
Or maybe is there any simple way to create DataList (or repeater) that would allow for paging

Thanks for any suggestion
Michal Januszczyk
 
P

Patrick.O.Ige

I guess there ia a solution to that..will post that later..
By the way Pan Michal Januszczyk are u writing from Poland?


Michal Januszczyk said:
is it possible to have a datagrid control render elements not in "single element => single row"
way, but many (e.g 2) elements (ordered horizontally) per single row. I
know that I can use dataList or data Repeater
to render custom HTML, however datagrid provides almost automatic paging
functionality that i want to use.
 
J

Jon

Hi,
you can make a template column and put whatever you want in it

<asp:TemplateColumn>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Field1")%>>
<br><%# DataBinder.Eval(Container.DataItem, "Field2")%></a>
</ItemTemplate>
</asp:TemplateColumn>

Jon
 
G

Guest

<asp:TemplateColumn><ItemTemplate><%# DataBinder.Eval(Container.DataItem, "Field1")%>><br><%# DataBinder.Eval(Container.DataItem, "Field2")%></a></ItemTemplate></asp:TemplateColumn

Thanks, but this does not work for me.
I wanted several _columns_ in a row, not several _rows_ in a row.
By inserting a "br" You force browser to display a new _row_, whereas i wanted columns

Thank
Michal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top