473,508 Members | 3,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Binding a multi-dimensional array to a repeater

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>

Nov 3 '06 #1
4 3431
Introduce a property that returns exactly what you want and databind to this
property rather than to the whole array.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"De_Kabal" <u28637@uwewrote in message news:68bfbfe76826e@uwe...
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>

Nov 5 '06 #2
How do you do that or point me where I can get the information? Still a newb
at this.

thanks

Eliyahu Goldin wrote:
>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>
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200611/1

Nov 5 '06 #3
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" <u28637@uwewrote in message
news:68d6f68a92e50@uwe...
How do you do that or point me where I can get the information? Still a
newb
at this.

thanks

Eliyahu Goldin wrote:
>>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>

--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200611/1

Nov 5 '06 #4
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:ON**************@TK2MSFTNGP03.phx.gbl...
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!
Nov 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2319
by: Ann Morris | last post by:
INTRODUCTION One of the most powerful aspects of .NET and Windows Forms is data binding. Data binding is the process of associating user interface (UI) elements with a data source to generate a...
9
10392
by: Zlatko Matić | last post by:
I was reading about late binding, but I'm not completely sure what is to be done in order to adjust code to late binding... For example, I'm not sure if this is correct: early binding: Dim ws...
0
1444
by: Ian | last post by:
I have sub-classed the Page class in order to provide some base properties and methods that every page on my site will need access to. I would like to have these things show up in the Simple...
1
2613
by: Bruce | last post by:
Hi, there, I meet a problem about comboBox binding. -------------------- Database: Northwind Tables: 1) Products 2) Categories I create a form (named "form1") to edit the record from...
0
4779
by: JSantora | last post by:
Essentially, InsertAT is broken! For the past couple of hours, I've been getting this "Parameter name: '-2147483550' is not a valid value for 'index'." error. Apparently, its caused by having...
1
1757
by: js | last post by:
I am using executeReader to get a SqlDataReader as in my code below. The SqlDataReader contains two tables. I am trying to bind each table to its respective dropdown list control. Thanks. ...
1
1388
by: xtseeker | last post by:
We have a multi-threaded .NET application, the problem is that the previous programmer didn't care to have locks on the shared variables. Somehow the application doesn't end up in Locked state on a...
3
1630
by: sekshin8 | last post by:
I am trying to bind fields from the first three records of a query (three records will always be returned by the query) to three textboxes on a windows form. ex. Textbox1.text = row1 column1...
1
1548
by: Larry R | last post by:
Asp.net 2.0. Binding a Gridview. UNtil now, it had been simple BoundColumns, but now I need to have one column show the values of 3 columns ( they are in the same datasource). I thought that I...
15
3086
by: Tom Gur | last post by:
Hi, What is early/late binding ?
0
7229
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7333
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.