I have an issue with detailsview control bound to an objectdatasourc e.
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 objectdatasourc e 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 one
field into a template field and add a dropdown control, the value that i
select in dropdown control is not bound properly to my business entity
object's property.
I'm i missing something here...
Thanks,
<Ram/>
--
Thanks,
<Ram/> 2 1581
I figured out a work around for this by implementing ItemInserting event
handler. In the iteminserting event handler i do a detailsview.fin dcontrol ,
get a reference of dropdown control, get the selected value and add it to
e.values dictionary.
My question is is this by design? why can't template fields be automatically
bound to business object?
I appreciate any feedback comments...
Thanks,
<Ram/>
"Ram" wrote: I have an issue with detailsview control bound to an objectdatasourc e. 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 objectdatasourc e 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 one field into a template field and add a dropdown control, the value that i select in dropdown control is not bound properly to my business entity object's property. I'm i missing something here...
Thanks, <Ram/> -- Thanks, <Ram/>
I guess it kind of make sense, why they are not automatically bound to
business object. if you have multiple controls in template how do you know
which one gets bound to business object property.
Thanks,
<Ram/>
"Ram" wrote: I figured out a work around for this by implementing ItemInserting event handler. In the iteminserting event handler i do a detailsview.fin dcontrol , get a reference of dropdown control, get the selected value and add it to e.values dictionary. My question is is this by design? why can't template fields be automatically bound to business object?
I appreciate any feedback comments...
Thanks, <Ram/>
"Ram" wrote:
I have an issue with detailsview control bound to an objectdatasourc e. 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 objectdatasourc e 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 one field into a template field and add a dropdown control, the value that i select in dropdown control is not bound properly to my business entity object's property. I'm i missing something here...
Thanks, <Ram/> -- Thanks, <Ram/>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Bailey |
last post by:
When I first built a few web pages in ASP .Net 2.0, I thought it was great.
The formview and detailview contorls would automatically layout the controls
for you, the update methods were automatically generated, and the
objectdatasource let you design against a business object through the gui.
Now I am working on my first real web application on 2.0, and I find this
automatic functionality doesn't do much beyond allowing me to generate...
|
by: ulrich schumacher |
last post by:
Hi ASP.NET 2.0 Professionals,
I've got a question concerning the new ASP.NET 2.0 DataBinding with object
oriented business classes:
Example:
There are two business classes in my domain model:
public class Language
|
by: thzero |
last post by:
Is there any way to do this without using the ObjectDataSource? (Apologies
for the long post)
I have a simple data object:
public class TestDO
{
public TestDO() {}
public ID { get; set; }
public Name { get; set; }
public Description { get; set; }
|
by: Trail Monster |
last post by:
Ok, I've been searching the net now for several days and can't find how to do
this anywhere.
Version:
VS 2005 Professional Release, 2.0 Framework
Background:
I have a complex business object Employee that contains public properties
and several nested objects such as a Spouse object and a List of Coverage
objects.
|
by: Simon Gregory |
last post by:
I am currently attempting to figure out how the new databinding
stucture works in ASP.NET 2.0 after working with v1.0 & v1.1 for
several years.
It seems that if you wish to do set up databinding at Design Time, you
are restricted to using one of the 5 xxxDataSource controls.
The data in our websites are usually obtained via a set of webservices
and are contained in a set of strongly typed relational DataSets.
| |
by: GaryDean |
last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much
in answers so I'm reposting some questions posted by some of the programmers
here in our organization that never got answered...
In 1.1 we always did our own myDataAdapter.fills and we liked that control
for lots of good reasons. Now the new DataSource (or is it a
TableAdapter:Dataset) automatically fills the Gridview. How can we control
that fill?
In a...
|
by: Joey Chömpff |
last post by:
L.S.,
Hello is there a way to implement 2-way databinding without using the
datasources from dotnet 2.0. Why would you ask? Now that's simple.
I've created an object model with BusinessObjects and I don't want to write
an separate provider layer for the datasources. This is because I loose all
the benefits of my objectmodel.
Are there other developers who think this way?
|
by: Wayne Sepega |
last post by:
I have the following Object DataSource
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetCustomer"
TypeName="Customers"
DataObjectTypeName="Customer"
InsertMethod="InsertCustomer"
OnUpdated="ObjectDataSource1_Updated"
UpdateMethod="UpdateCustomer"
OnSelected="ObjectDataSource1_Selected">
|
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?
|
by: cmrchs |
last post by:
Hi,
I'm trying out Databinding to a Data Acces Layer using a GridView and
ObjectDataSource-control
The Update works fine but the Delete-method doesn't ???
<asp:GridView ID="GridView1" runat="server"
DataSourceID="ObjectDataSource1"
OnRowUpdating="GridView1_RowUpdating"
|
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...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
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();...
| |
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |