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