Hello.
I have an interesting data binding scenario:
I have a repeater control. It repeats a typical custom web user
control.
I also have a collection object, and each collection element contains
various pieces of information inside a custom object, including an id
field.
This bit's quite easy: bind the collection object to the repeater, and
get each repeated web user control to display various data fields that
the collection object's elements contain.
The challenge is: I have a second collection object, and both
collection objects conveniently share the same id field for cross
checking purposes. I need the repeated web user controls to display
various data fields from *both* collections, and not just from one
collection, but I can only bind one collection to the repeater
control.
Any thoughts at all would be gratefully received...apar t from "good
luck!" <g>
TIA,
-dnw. 1 2718
I found a way to solve this problem.
Just take the id field from the first collection, and bind it to a
public property inside the web user control. Then, inside this web
user control's code behind class, you have access to this id field
(from the first collection), which you can then use to search for
objects inside the second collection, as the 2 collections are linked
together via the common id field.
-dnw. do***@hotmail.c om (Dot net work) wrote in message news:<77******* *************** ****@posting.go ogle.com>... Hello.
I have an interesting data binding scenario:
I have a repeater control. It repeats a typical custom web user control.
I also have a collection object, and each collection element contains various pieces of information inside a custom object, including an id field.
This bit's quite easy: bind the collection object to the repeater, and get each repeated web user control to display various data fields that the collection object's elements contain.
The challenge is: I have a second collection object, and both collection objects conveniently share the same id field for cross checking purposes. I need the repeated web user controls to display various data fields from *both* collections, and not just from one collection, but I can only bind one collection to the repeater control.
Any thoughts at all would be gratefully received...apar t from "good luck!" <g>
TIA, -dnw. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Donald Williamson |
last post by:
I have a DataReader that I am binding to a Repeater control. In the
DataReader, I have two fields: 'Name1' and 'Name2'
'Name1' will always have a person's name. Name2 periodically has a person's
name. So the question is if there is a value in 'Name2', I want to display
only that name. Otherwise, display 'Name1'
Any help on how to do this?
Using VS.NET - vb
|
by: Jordan |
last post by:
I'm curious if the whole point of Repeaters/Data Lists/Grids is
encapsulating additional functionality like add/update/edit/deletes, but
really does not provide any benefits when it comes to simply displaying
information.
For example, if I wanted ONLY to show information (not edit/adds/etc) in a
format that is similar, but has customized text (ex. make this word a link
if the quantity is > 0). Which of these methods would be better, if...
|
by: Paul K |
last post by:
I'm having a problem getting the data binding to work with the repeater control. Here's the code for the code-behind class
private void Page_Load(object sender, System.EventArgs e
if (!this.IsPostBack
DataView dv = new DataView(AlbumMgr.Instance.GetAlbumsList())
rptalbums.DataSource = dv
rptalbums.DataBind()
|
by: darrel |
last post by:
*sigh*...I've asked this before, but have long forgotten the answer.
In the past, I'd often use repeater controls, bind data to it, and then
reference the data fields from within the repeater:
<%# DataBinder.Eval(Container.DataItem, "agentMobilePhone") %>
More recently, I've been doing more of the building on the codebehind side,
creating a string builder and building the table from there. When doing
that, I access the data like this:
|
by: .Net Sports |
last post by:
I am resurrecting an old script from a previous programmer, and want to
migrate it over to asp.net from classic asp. Tho there are other
peripheral parts of the script (that really have no bearing on the
core, in which I will explain), the main core is the concern. I have a
daily feed from a horseracing prognosticator that gets put into an sql
database on a daily basis for roughly 15 popular racetracks. A user
(who will need a...
| |
by: charliewest |
last post by:
Hello -
I'm using a Repeater control to render information in a very customized
grid-like table. The Repeater control is binded to a DataSet with several
records of information. Within the Repeater control, I've placed
DropDownLists and CheckBoxes.
When the user has updated the information, he/he clicks the submit button
which is outside the scope of the Repeater control.
|
by: Jaybuffet |
last post by:
my aspx has something like this
<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate>
<mycontrol:ctl id="ctlId" obj='<%# Container.DataItem %>'
showItem="true"/>
</ItemTemplate>
/asp:Repeater>
The DataSource for this Repeater is a CollectionBase of objects and is
|
by: Alex Maghen |
last post by:
I'm having trouble with my repeater:
I'm binding my Repeater control to an OleDbDataReader object. My ASPX looks
like this:
<asp:Repeater ID="Rptr" runat="server">
<ItemTemplate>
<asp:Label ID="LB" runat="server" Text="" />
<br/>
<%# Eval("TextBody") %>
|
by: Brad Baker |
last post by:
I'm going a little crazy :) I'm trying to bind a repeater control to a
dataset on page load using the following code:
if (Request.QueryString != null)
{
string customerid = Request.QueryString;
//open connection
SqlConnection m_conn = new SqlConnection("Server=server;
Database=database; UId=username; Pwd=password");
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |