I have a spec for a datagrid that the client has provided that includes
40 columns that the client wants to be able to edit.
What is the best way of formatting very long tables for display? I saw a
note posted to say use a dropdownlist to allow users to select
additional fields for view if the table exceeds the display size. I
think that will not be an option for me as the client has stated that
they need to see and edit all fields from the default view. I think they
want something like below where the rows are stacked upon one another so
like...
First record:
row 1: cols 1 to 10
row 2: cols 11 to 20
row 3: cols 21 to 30
row 4: cols 31 to 40
Second record:
row 5: cols 1 to 10
row 6: cols 11 to 20
row 7: cols 21 to 30
row 8: cols 31 to 40
Can this be done within a datagrid?
Joe
Eliyahu Goldin - 27 Feb 2006 16:19 GMT
You can do it with a repeater. Set it up within an html table like this:
<table>
<asp:repeater>
<asp:itemtemplate>
<tr>
<td>bound to column 1</td>
...
<td>bound to column 10</td>
</tr>
<tr>
<td>bound to column 11</td>
...
<td>bound to column 20</td>
</tr>
<tr>
<td>bound to column 21</td>
...
<td>bound to column 30</td>
</tr>
<tr>
<td>bound to column 31</td>
...
<td>bound to column 40</td>
</tr>
</asp:itemtemplate>
</asp:repeater>
</table>
Eliyahu
>I have a spec for a datagrid that the client has provided that includes
> 40 columns that the client wants to be able to edit.
[quoted text clipped - 22 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***