473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

2 objects at once ?

Hey!
How to display 2 object at once using ObjectDataSource? Let's say I have
gridView and I want to display 5 columns from one object and another 5 from
another object. If I were using SqlDataSource I'd just join to tables but
it's not that simple so... is there a way to do it with objects ?
Jarod

May 5 '06 #1
1 932
Create a wrapper object

public class Foo {
public int Bar;
}

public class Foo2 {
public int Bar2 {
}

public class BindingClass {
private Foo foo;
private Foo2 foo2;

public int Bar {
get { return foo.Bar; }
set { foo.Bar = value; }
}

public int Bar2 {
get { return foo2.Bar2; }
set { foo2 .Bar2 = value; }
}
public BindingClass(Foo _Foo, Foo2 _Foo2) {
foo = _Foo;
foo2 = _Foo2;
}
}

then use binding class to bind the object.

Cheers,

Greg
"Jarod" <bl*****@NOSPAM.gazeta.pl> wrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
Hey!
How to display 2 object at once using ObjectDataSource? Let's say I have
gridView and I want to display 5 columns from one object and another 5
from another object. If I were using SqlDataSource I'd just join to tables
but it's not that simple so... is there a way to do it with objects ?
Jarod

May 5 '06 #2

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

Similar topics

11
by: thechaosengine | last post by:
Hi all, I have a very general but quite significant question about objects. My question is, when should I create them? I know thats a crap question so let me explain a bit further. Lets...
106
by: xtra | last post by:
Hi Folk I have about 1000 procedures in my project. Many, many of them are along the lines of function myfuntion () as boolean on error goto er '- Dim Dbs as dao.database Dim Rst as...
0
by: Nashat Wanly | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui06032003.asp Don't Lock Type Objects! Why Lock(typeof(ClassName)) or SyncLock GetType(ClassName) Is Bad Rico...
2
by: Claire | last post by:
If I need to create thousands of objects of the same type, is it more economical (memory wise) to use static member functions where possible? How about virtual ones?
5
by: Ron Mexico | last post by:
I have written a graphing engine (very similar to what BigCharts.com offers). Basically, it's an ASPX page that accepts parameters and calls back-end business objects (dlls) to create a graph. ...
161
by: KraftDiner | last post by:
I was under the assumption that everything in python was a refrence... so if I code this: lst = for i in lst: if i==2: i = 4 print lst I though the contents of lst would be modified.....
2
by: wlevine | last post by:
Can someone give me an example of how to construct an array of objects? for example, I have: function objFacility(id,name,adr,city,state,zip) { this.id = id this.name=name this.adr=adr...
9
by: jdlists | last post by:
I have inheirted some existing code, that i will explain in a moment, have needed to extend and ultimately should be able to run in threads. I've done a bunch of work with python but very little...
4
by: chris.lyon | last post by:
I'm trying to generate visual python objects from django objects and therefore have objects called 'Ring' and 'Cylinder' as django objects and I want to create objects of those names in visual. I...
167
by: darren | last post by:
Hi I have to write a multi-threaded program. I decided to take an OO approach to it. I had the idea to wrap up all of the thread functions in a mix-in class called Threadable. Then when an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
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...
0
agi2029
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,...
0
isladogs
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...

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.