I have an arraylist storing objects that I've defined my own. The object is
called Stock. And each stock has attributes like Comp, PartNo, Model, and
etc. I want to bind this arraylist with a repeater. But I always get an error
message:
"No default member found for type Stock."
This is where the error came from:
<ItemTemplate >
<tr>
<td align=center><% # Container.DataI tem("Comp") %></td>
<td align=center width="168"><%# Container.DataI tem("Model") %></td>
<td align=center width="115"><%# Container.DataI tem("Part") %></td>
<td align=center width="47"><%# Container.DataI tem("WIPQty") %></td>
<td align=center><% # Container.DataI tem("FGQty") %></td>
<td align=center><% # Container.DataI tem("ReservedQt y") %></td>
<td align=center><% # Container.DataI tem("AvailQty") %></td>
<TD align=center><% # Container.DataI tem("POBal") %></TD>
</tr>
</ItemTemplate>
The question I want to ask is, how do you bind a arraylist that stores
objects with a repeater? 1 1975
Assuming that the arraylist stores objects of type Stock, try
<td align=center><% # ((Stock) Container.DataI tem).Comp %></td>
For the repeater you should specify DataSource=''<% # MyArrayList %>"
Eliyahu
"wrytat" <wr****@discuss ions.microsoft. com> wrote in message
news:15******** *************** ***********@mic rosoft.com... I have an arraylist storing objects that I've defined my own. The object
is called Stock. And each stock has attributes like Comp, PartNo, Model, and etc. I want to bind this arraylist with a repeater. But I always get an
error message:
"No default member found for type Stock."
This is where the error came from:
<ItemTemplate > <tr> <td align=center><% # Container.DataI tem("Comp") %></td> <td align=center width="168"><%# Container.DataI tem("Model") %></td> <td align=center width="115"><%# Container.DataI tem("Part") %></td> <td align=center width="47"><%# Container.DataI tem("WIPQty") %></td> <td align=center><% # Container.DataI tem("FGQty") %></td> <td align=center><% # Container.DataI tem("ReservedQt y") %></td> <td align=center><% # Container.DataI tem("AvailQty") %></td> <TD align=center><% # Container.DataI tem("POBal") %></TD> </tr> </ItemTemplate>
The question I want to ask is, how do you bind a arraylist that stores objects with a repeater?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jax |
last post by:
I have an arraylist of objects. This arraylist is bound to a repeater. That repeater then creates a set of controls like so
<asp:repeater id="garmentRepeater" runat="server" OnItemCommand="Repeater_ButtonClick"><HeaderTemplate><asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 250px; POSITION: absolute; TOP: 80px" runat="server
Width="200px" Height="50px" Font-Names="Impact" Font-Size="Large">Garments on...
|
by: Dmitri Shvetsov |
last post by:
Hi All,
Is it possible at all, and if yes, then how? Or it's very/extremely hard to
do that? Maybe somebody knows...)
I'm writing a Web App using VS2003/C#/MSSQL.
I'm currently having about 100 different questions, some questions are
having relations to another questions and should be published only if the
parent has an answer, the most part of the questions should have answers,
|
by: Eric |
last post by:
Hello,
I have the following dataset that I want to bind to a repeater to be
displayed as a table.
Owner Animal Volume
---------------------------
Eric Dog 6
Eric Cat 3
Eric Gerbil 1
Eric Bird 10
|
by: Simon Gorski |
last post by:
hello ng,
I have a repeater control with an arraylist as a datasource.
Now I want a new row only if they next value in the arraylist has changed!
But how? - Can you help me please?!
thanxs simon g.
|
by: wrytat |
last post by:
There's a column in my repeater that stores a value that can be 0 or more
than that. If the value is 0, I want to just display the number 0. But if the
value is more than 0, I want to show a link so that the user can click. Is it
possible to do that? I'm binding the repeater with an arraylist of objects.
Thank you.
| |
by: Alan Silver |
last post by:
Hello,
I'm trying to use an ArrayList to do data binding, but am getting an
error I don't understand. I posted this in another thread, but that was
all confused with various other problems, which could be why no-one
answered it!! I've now narrowed the problem down, so am starting a new,
more specific, thread. Sorry it's a bit long, but it's reasonably simple
stuff.
I have a page where I'm showing product details, including any
|
by: ratnakarp |
last post by:
Hi,
I have a search text box. The user enters the value in the text box and
click on enter button. In code behind on button click i'm writing the
code to get the values from the database and binding it to a repeater
control. This repeater control has multiple text boxes and buttons. Can
you please tell me how can i do paging in this case ?
I'm posting my code below. The problem is that if i click on
"AdjustThisAd" button, it opens...
|
by: Eugene Anthony |
last post by:
The problem with my coding is that despite removing the records stored
in the array list, the rptPages repeater
control is still visible. The rptPages repeater control displayes the
navigation link (1,2,3 so on). The code can be found in
SubscriptionCart.aspx.cs.
Default.aspx
------------
|
by: psycho |
last post by:
i was trying to bind a repeater with an arraylist.
what i was not able to figure out was what should i use in the
Eval("") expression.
Any suggestions .
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |