PC Review


Reply
Thread Tools Rate Thread

Confused about Gridview and DataSourceID

 
 
dgk
Guest
Posts: n/a
 
      29th Jun 2006
I have a gridview for which the datasource at design time is a method
that returns a collections.generic.List (of MyClass). That created an
ObjectDataSource1 which is the DataSourceID for the gridview. At run
time I figured that I would just set the datasource to another List
(of MyClass) which I'm actually generating on the fly.

That works, but the GV can't be sorted because that relies on the
DataSourceID which has to be wiped when I set the DataSource of the GV
directly.

So, I tried to use the method that returns the list to really do the
work, but I can't figure out how to pass in the parameters that will
be required. I tried setting the ObjectDataSource1.SelectParameters to
what needs to be passed to the method but I can't get the syntax
right.

Any help greatly appreciated.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataSourceID of .. must be the ID of a control of type IDataSource =?Utf-8?B?Sm9ieTY0?= Microsoft ASP .NET 0 25th Apr 2007 09:02 PM
Both DataSource and DataSourceID are defined byrd48 Microsoft ASP .NET 1 18th Apr 2007 10:52 AM
Gridview and DatasourceID hfritz Microsoft ASP .NET 1 29th Aug 2006 03:40 AM
Programatically change DataSourceID? =?Utf-8?B?QnJlbmRlbiBCaXhsZXI=?= Microsoft ASP .NET 3 12th Dec 2005 07:17 AM
confused about customizing gridview control asp.net 2.0 Steve Microsoft ASP .NET 0 2nd Sep 2005 03:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:10 AM.