I have dain bramage...

D

Dave T

On a button click, I want to get some data and bind it to a grid view using
an object data source:
<code>
Dim _DataSource As New ObjectDataSource
_DataSource.TypeName = GetType(BusinessFacade).ToString
_DataSource.SelectMethod = "GetAddresses"
</code>
the only thing is, the BusinessFacade object has a couple of properties I
want to set before calling the select method. How do I communicate with the
instance of BusinessFacade the object data source creates?
 
L

Lloyd Sheen

Dave T said:
On a button click, I want to get some data and bind it to a grid view
using
an object data source:
<code>
Dim _DataSource As New ObjectDataSource
_DataSource.TypeName = GetType(BusinessFacade).ToString
_DataSource.SelectMethod = "GetAddresses"
</code>
the only thing is, the BusinessFacade object has a couple of properties I
want to set before calling the select method. How do I communicate with
the
instance of BusinessFacade the object data source creates?

I am assuming that you are using VB.Net as programming language. What you
are doing in code is attempting to simulate what is done thru markup in your
code.

What you need (not checked) is something like:

Dim _DataSource as new _YourObjectList
_yourObjectList = GetAddresses( ... with all parameters)
GridView1.DataSource = _DataSource
GridView1.DataBind()

Hope this helps
Lloyd Sheen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,965
Members
47,512
Latest member
FinleyNick

Latest Threads

Top