The pageddatesource needs to be bound to an object of the inumerable
interface - it says so in the compiler error. Here is some code that you can
follow.
http://www.google.com/codesearch?hl=en&q=+new+PagedDataSource()%3B+show:VsAXU5o_
YNc:ibPMvVa8Myw:4b-erpyux6E&sa=N&cd=5&ct=rc&cs_p=http://media.wiley.com/product_
ancillary/07/04717935/DOWNLOAD/793507%2520ch33.zip&cs_f=793507+ch33/Code/App_Cod
e/BaseWebParts/GridView.cs#a0

Signature
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
> Hi,
>
[quoted text clipped - 36 lines]
> </SelectParameters>
> </asp:SqlDataSource>
Chris - 06 Feb 2007 18:52 GMT
Hi thanks for replying, but your file is very big and i'm a little bit
confused.
Do i have to define a datareader or dataset in the code-behind and use it as
source of the PagedDataSource?
In that case, i have to redine the sql statement and select parameter
defines in the aspx file, i guess?
Thanks again
> The pageddatesource needs to be bound to an object of the inumerable
> interface - it says so in the compiler error. Here is some code that you
[quoted text clipped - 42 lines]
>> </SelectParameters>
>> </asp:SqlDataSource>
Chris - 06 Feb 2007 20:14 GMT
I tried this now, but same error:
Dim PageDataSource As New PagedDataSource()
Dim d As SqlDataAdapter
Dim ds As DataSet
Dim sql As String
Dim sConnectionString As String
sConnectionString = System....
sql = "select ..."
d = New SqlDataAdapter(sql, sConnectionString)
ds = New DataSet()
d.Fill(ds)
PageDataSource.DataSource = ds
PageDataSource.AllowPaging = True
PageDataSource.PageSize = 4
DataList1.DataSource = PageDataSource 'datalist is defined in aspx file
DataList1.DataBind()
I definitively miss something, i'm afraid of ...
> The pageddatesource needs to be bound to an object of the inumerable
> interface - it says so in the compiler error. Here is some code that you
[quoted text clipped - 42 lines]
>> </SelectParameters>
>> </asp:SqlDataSource>
Alvin Bruney [MVP] - 11 Feb 2007 14:27 GMT
Read the link i sent you again, search for .datasource, you will see it
declared as an ienumerable variable. Mirror that concept in your code. On
the larger issue of why exactly you are using that type of control, you may
want to explain a bit - without knowing your design goals, i have trouble
understanding why you can't simply use a gridview object.

Signature
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
OWC Black book on Amazon and
www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
>I tried this now, but same error:
>
[quoted text clipped - 64 lines]
>>> </SelectParameters>
>>> </asp:SqlDataSource>