Click to See Complete Forum and Search --> : GridView Display Layout?


lmf232s
03-21-2006, 10:48 AM
? Im not sure if i should even be using a gridview for this.

This is my first attempt at learning asp.net and im using 2.0 if it matters.

Basically i have called a SP and retruned the records to a gridview (again im not even sure this is what i should be using). Now what i need to do is format this phone list like i have done w/ asp.

Its a basic table set up w/ 3 columns and about 35 rows in each column.

What i need to do is create the phone list so it looks something like this

Name Ext Name Ext Name Ext
Joe Smoe 111 Don Knots 134 Alex Gane 323
Don Diddle 522 Rich Chris 442 Richard Johnson 432

Any help would be appreciated.

Thanks.

lmf232s
03-21-2006, 11:45 AM
This is what i cam up w/ and it does not seem like its the best way to do this.

Please let me know if there is a better way to do this.


<asp:DataList ID="DataList1" runat="server" DataSourceID="ObjectDataSource1" RepeatColumns="3" RepeatDirection="Vertical">
<HeaderTemplate>
<table border="1">
<tr>
<td></td>
<td>Name</td><td>Ext</td>
<td></td>
<td>Name</td><td>Ext</td>
<td></td>
<td>Name</td><td>Ext</td>
</tr>
<tr>
</HeaderTemplate>
<ItemTemplate>
<td align="left"><%# Eval("Employee")%></td>
<td align="right"><%# Eval("Ext")%></td>
</ItemTemplate>
<FooterTemplate>
</tr>
</table>
</FooterTemplate>
</asp:DataList>

sirpelidor
03-21-2006, 07:36 PM
based on the format u wanted. I suggest go with datagrid instead of datalist