473,797 Members | 2,893 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reloading ObjectDataSourc e 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 1552
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.PageIn dex 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.Da taBind 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1581
by: Ram | last post by:
I have an issue with detailsview control bound to an objectdatasource. scenario is i have a business logic component with CRUD methods that accept custom business entity objects. In asp.net layer I'm using gridview and detailsview controls that gets bound to an objectdatasource control which uses my businesslogic CRUD methods. Now If i use all databound fields, all my selects, inserts, updates, deletes work just fine. As soon as i convert...
2
3826
by: Damon | last post by:
Help! Need this fixed ASAP. I have a GridView/DetailsView master/details form set up, with both bound to separate ObjectDataSource objects. Both the GridView and the DetailsView have a DataKeyNames parameter of "UserCompany, BillableCompany". The DetailsView has control parameters for its select method pointing to these two keys on the GridView. But the select method function receives two copies of the UserCompany field! The...
0
1477
by: Kevin | last post by:
Hi my name is Kevin I am currently working on a Asp 2.0 project and im having some ObjectDataSource Problems The thing is i have a Class called User and a Bussiness Logic Layer FcUser with the functions GetAllUsers, GetUserByID(int) and a InsertUser(BoUser as User), the both return a generic list of User objects, the insert method sends a User object from my UI provided by the ObjectDatasource
0
1326
by: John Davis | last post by:
Hi all, hope you are well. I would like to know if I can access the strongly typed properties of my datatable when binding through the ObjectDataSource object. I am currently creating some hyperlinks in a repeater bound to an objectdatasource with the following code: <asp:HyperLink runat="server" ID="HyperLink1" NavigateUrl='<%# string.Format("~/Products.aspx?page=0&categoryId={0}",
0
1398
by: John Davis | last post by:
Hi all, hope you are well.(not sure if this posted the first time) I would like to know if I can access the strongly typed properties of my datatable when binding through the ObjectDataSource object. I am currently creating some hyperlinks in a repeater bound to an objectdatasource with the following code: <asp:HyperLink runat="server" ID="HyperLink1" NavigateUrl='<%# string.Format("~/Products.aspx?page=0&categoryId={0}",
14
14660
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control so I get the ObjectDataSource. No problem ..... ObjectDataSource src = .... //is ok i have it
0
1127
by: HockeyFan | last post by:
I've got Gentle.Net objects bound to an ObjectDataSource. I have a grid that comes up fine. I then have a DetailView that is bound to another ObjectDataSource. When I try to update from the DetailView, I can put a break point in the ItemInserting and/or ItemUpdating handlers and step through and watch when the object is set. Each of the object properties, minus the ID field, are set. The ID field is left to zero, as this is the...
0
1314
by: Leon Mayne | last post by:
We have static functions in our data access layer that return generic lists of our business objects, such as this: Public Shared Function AllUsers() as Generic.IList(of OurUserObject) Dim colUsers as New Generic.List(of OurUserObject) ' Populate collection here Return colUsers End Function These methods are used thoughout the code, but in some aspx files we would
5
2177
by: cmrchs | last post by:
Hi, I'm trying out Databinding to a Data Acces Layer using a ObjectDataSource-control The Update works fine but the Delete-method doesn't. when debugging I see that my productID-parameter is always 0 and not the ID of the selected record (which is the case when updating) How come?
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10245
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10021
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9063
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7559
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.