Lately I
heard a remark that its not possible to supply other parameters than strings
to filter the datasource in order to fill a gridview. Since I was
quite sure thats not the case, I accepted the challenge (from myself) to prove
him wrong.
First add (drag/drop)
an ObjectDataSource object to the page or user control. Configure
the datasource to use a list of objects (here an object of type UserList).

Now define
the (static) method used to load this object.
This is how
the methods in the Business Object look like (just an example).

The
parameter(-s) will now be visible on the next screen, dont choose a source in
here!

After
finishing the wizard, the result is this :
Now all
thats required is to modify the InputParameters in the Selecting event of the ObjectDataSource.

That's it !
05-09-2007 om 09:31
geschreven door Reinout Waelput 
|