Binding a multi-dimensional array to a repeater

D

De_Kabal

I'm trying to bind a 12x16 array to a repeater to display the information in
a table to have certain format. Right now all it does is display all the
array elements on individual rows. Does anyone know how to display the data
on just the 12 row?

thanks;

Here is my code:

Binding:
fismaRepeater.DataSource = PIIArrayTotals
Page.DataBind()

Repeater:
<ItemTemplate>
<tr>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
<td><%#Container.DataItem%> </td>
</tr>
</ItemTemplate>
 
E

Eliyahu Goldin

Introduce a property that returns exactly what you want and databind to this
property rather than to the whole array.
 
D

De_Kabal via DotNetMonster.com

How do you do that or point me where I can get the information? Still a newb
at this.

thanks

Eliyahu said:
Introduce a property that returns exactly what you want and databind to this
property rather than to the whole array.
I'm trying to bind a 12x16 array to a repeater to display the information
in
[quoted text clipped - 32 lines]
</tr>
</ItemTemplate>
 
E

Eliyahu Goldin

Actually, after another look, I think it would be easier to make a runtime
DataTable object of the array and databind to the DataTable. The DataTable
will have exact format you need and the databinding will be trivial, like in
any msdn example.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


De_Kabal via DotNetMonster.com said:
How do you do that or point me where I can get the information? Still a
newb
at this.

thanks

Eliyahu said:
Introduce a property that returns exactly what you want and databind to
this
property rather than to the whole array.
I'm trying to bind a 12x16 array to a repeater to display the
information
in
[quoted text clipped - 32 lines]
</tr>
</ItemTemplate>
 
M

Mark Rae

Actually, after another look, I think it would be easier to make a runtime
DataTable object of the array and databind to the DataTable. The DataTable
will have exact format you need and the databinding will be trivial, like
in any msdn example.

Yes, absolutely!
 

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,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top