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

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
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
 
<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
 
Back
Top