469,920 Members | 2,371 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

binding a Generic.List to a repeater

Hi,

It is not possible to bind a Generic.List collection to a repeater I
guess huh?

I am getting this error:

An invalid data source is being used for rpCategories. A valid data
source must implement either IListSource or IEnumerable.
Is this correct or could I be doing something else wrong?
Jan 2 '08 #1
5 14021
List<Tor List(of T) has a ToArray method. You could bind to the output of
that method call to your repeater.

Mark Dykun

"DotNetNewbie" <sn***********@yahoo.comwrote in message
news:11**********************************@s8g2000p rg.googlegroups.com...
Hi,

It is not possible to bind a Generic.List collection to a repeater I
guess huh?

I am getting this error:

An invalid data source is being used for rpCategories. A valid data
source must implement either IListSource or IEnumerable.
Is this correct or could I be doing something else wrong?

Jan 2 '08 #2
This seems a little strange to me, as IList<Textends IEnumerable<T>,
which extends IEnumerable, so the error message must be wrong (or you are
not passing what you think is an IList<Timplementation).

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"DotNetNewbie" <sn***********@yahoo.comwrote in message
news:11**********************************@s8g2000p rg.googlegroups.com...
Hi,

It is not possible to bind a Generic.List collection to a repeater I
guess huh?

I am getting this error:

An invalid data source is being used for rpCategories. A valid data
source must implement either IListSource or IEnumerable.
Is this correct or could I be doing something else wrong?

Jan 2 '08 #3
On Jan 2, 12:57 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
This seems a little strange to me, as IList<Textends IEnumerable<T>,
which extends IEnumerable, so the error message must be wrong (or you are
not passing what you think is an IList<Timplementation).

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

"DotNetNewbie" <snowman908...@yahoo.comwrote in message

news:11**********************************@s8g2000p rg.googlegroups.com...
Hi,
It is not possible to bind a Generic.List collection to a repeater I
guess huh?
I am getting this error:
An invalid data source is being used for rpCategories. A valid data
source must implement either IListSource or IEnumerable.
Is this correct or could I be doing something else wrong?
Yeah something else has to be wrong.

I changed the collection to an ArrayList and I still get the same
error.
Jan 2 '08 #4
On Jan 2, 1:57 pm, DotNetNewbie <snowman908...@yahoo.comwrote:
On Jan 2, 12:57 pm, "Nicholas Paldino [.NET/C# MVP]"

<m...@spam.guard.caspershouse.comwrote:
This seems a little strange to me, as IList<Textends IEnumerable<T>,
which extends IEnumerable, so the error message must be wrong (or you are
not passing what you think is an IList<Timplementation).
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
"DotNetNewbie" <snowman908...@yahoo.comwrote in message
news:11**********************************@s8g2000p rg.googlegroups.com...
Hi,
It is not possible to bind a Generic.List collection to a repeater I
guess huh?
I am getting this error:
An invalid data source is being used for rpCategories. A valid data
source must implement either IListSource or IEnumerable.
Is this correct or could I be doing something else wrong?

Yeah something else has to be wrong.

I changed the collection to an ArrayList and I still get the same
error.
Ok this is what happend:

I named my List<Tcollection rgSomething.

And my repeater was rpSomething.

And I was binding like so:

rpSomething.DataSource = rpSomething;

==I was binding a repeater to a repeater!!
Jan 2 '08 #5
Ah, there's the rub

Mark

"DotNetNewbie" <sn***********@yahoo.comwrote in message
news:0f**********************************@q77g2000 hsh.googlegroups.com...
On Jan 2, 1:57 pm, DotNetNewbie <snowman908...@yahoo.comwrote:
>On Jan 2, 12:57 pm, "Nicholas Paldino [.NET/C# MVP]"

<m...@spam.guard.caspershouse.comwrote:
This seems a little strange to me, as IList<Textends
IEnumerable<T>,
which extends IEnumerable, so the error message must be wrong (or you
are
not passing what you think is an IList<Timplementation).
--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com
"DotNetNewbie" <snowman908...@yahoo.comwrote in message
>news:11**********************************@s8g2000 prg.googlegroups.com...
Hi,
It is not possible to bind a Generic.List collection to a repeater I
guess huh?
I am getting this error:
An invalid data source is being used for rpCategories. A valid data
source must implement either IListSource or IEnumerable.
Is this correct or could I be doing something else wrong?

Yeah something else has to be wrong.

I changed the collection to an ArrayList and I still get the same
error.

Ok this is what happend:

I named my List<Tcollection rgSomething.

And my repeater was rpSomething.

And I was binding like so:

rpSomething.DataSource = rpSomething;

==I was binding a repeater to a repeater!!

Jan 2 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Donald Williamson | last post: by
reply views Thread by Emre Guldogan | last post: by
4 posts views Thread by Brad Baker | last post: by
3 posts views Thread by kevinwolfe | last post: by
reply views Thread by Leon Mayne | last post: by
reply views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.