471,049 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

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 1464
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.