468,268 Members | 1,540 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Reloading ObjectDataSource bound objects

I have a simple prototype ASP application with a business object wrapping a
data set. It contains a single data table.

On my UI I have two object data sources; the first has a bound drop down
list, with a description and key. The second has a bound details view showing
everything except for the key.

Selecting an item in the drop down list, causes the details to be shown, as
intended. When I insert a new record from the details view, I want to add it
to the drop down list and select it.

How do I do this?
Apr 3 '06 #1
1 1416
You can have the method that inserts the new record (in your BLL) returning
the primary key of the inserted record; which you use to set the
FormView.PageIndex as I did in this demo:
http://www.webswapp.com/codesamples/...s/default.aspx

You can then use that returned primarykey to select the item from the
dropdownlist after issuing a Dropdownlist.DataBind to refresh the list items
with the newly inserted record.

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Jamie Oglethorpe" wrote:
I have a simple prototype ASP application with a business object wrapping a
data set. It contains a single data table.

On my UI I have two object data sources; the first has a bound drop down
list, with a description and key. The second has a bound details view showing
everything except for the key.

Selecting an item in the drop down list, causes the details to be shown, as
intended. When I insert a new record from the details view, I want to add it
to the drop down list and select it.

How do I do this?

Apr 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Ram | last post: by
reply views Thread by HockeyFan | last post: by
reply views Thread by Leon Mayne | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.