473,667 Members | 2,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inherited Properties for a value object not bindable in a datagrid

I have what I'm hoping doesn't turn into a very big problem.
We have a set of value objects which all inherit from a base value object
which contains functionality common to all of the objects. We have
implemented some custom DataSourceObjec ts which return lists of these value
objects.

The problem I'm running into is I can't bind to any of the common properties
of the ancestor object. Nor can I even eval against them. Is there someway
to reference the inherited properties of my value object in an Eval()
statement? I tried Eval("base.valu eState") and Eval("valueStat e") but always
get the same error that the member doesn't exist.

I hope someone has had experience with this, it would be difficult to
refactor these value objects.

Thanks,
Matt Bell

Aug 10 '06 #1
2 1176
Sorry I misspoke. They are DataSourceContr ol objects not DataSourceObjec ts if
that was confusing.

"MattBell" wrote:
I have what I'm hoping doesn't turn into a very big problem.
We have a set of value objects which all inherit from a base value object
which contains functionality common to all of the objects. We have
implemented some custom DataSourceObjec ts which return lists of these value
objects.

The problem I'm running into is I can't bind to any of the common properties
of the ancestor object. Nor can I even eval against them. Is there someway
to reference the inherited properties of my value object in an Eval()
statement? I tried Eval("base.valu eState") and Eval("valueStat e") but always
get the same error that the member doesn't exist.

I hope someone has had experience with this, it would be difficult to
refactor these value objects.

Thanks,
Matt Bell
Aug 10 '06 #2
I knew as soon as I posted this I'd figure it out. The problem is that the
type needs to be exposed as a property. I think it has something to do with
how .net does reflection. So if your base object contains a type that you
want to bind to in a data grid, make sure it's got a property wrapping it.

"MattBell" wrote:
Sorry I misspoke. They are DataSourceContr ol objects not DataSourceObjec ts if
that was confusing.

"MattBell" wrote:
I have what I'm hoping doesn't turn into a very big problem.
We have a set of value objects which all inherit from a base value object
which contains functionality common to all of the objects. We have
implemented some custom DataSourceObjec ts which return lists of these value
objects.

The problem I'm running into is I can't bind to any of the common properties
of the ancestor object. Nor can I even eval against them. Is there someway
to reference the inherited properties of my value object in an Eval()
statement? I tried Eval("base.valu eState") and Eval("valueStat e") but always
get the same error that the member doesn't exist.

I hope someone has had experience with this, it would be difficult to
refactor these value objects.

Thanks,
Matt Bell
Aug 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4629
by: Earl Teigrob | last post by:
Is there a way to rename the public properties of a inherited class? I am inheriting an asp.net control (class) and am adding addtional functionality. (in this case, up to 3 borders on an imagebutton control) I would like to change the name of the BorderColor property to InnerBorderColor because it would make more sense in the context of this this new control. Thanks Earl
0
1504
by: Emil Georgiev | last post by:
Hell I have a Web Custom Control project in ASP.NET. I'm using a subclassing technique to add functionality in HyperLink web server control. I want to create a property "BrowserWindow" of my class "NewWinHyperLink" which will contain child properties. When I use this custom control in testing web application these child properties don't appear with 'plus sign' in visual studio designer. I want to make my parent property to have plus...
3
1648
by: Gene Hubert | last post by:
I've got a custom datagrid that inherits from the standard datagrid on a windows form. I expected that since it is an inherited object, protected properties from the standard datagrid would be visible in the property sheet when working with the custom datagrid on a form. This seems not to be the case. Am I expecting too much? Could it be due to using VB.net Standard 2002? Thanks, Gene H.
1
1663
by: Christophe Peillet | last post by:
I have a CompositeControl with two types of properties: 1.) Mapped Properties that map directly to a child control's properties (ex.: this.TextboxText = m_txt.Text). These properties are handled by their underlying classes (such as the TextBox control), and are not persisted by me. 2.) Unique Properties that don't map directly and are persisted in ViewState (ex.: this.LabelPosition, which specifies where on the form the label should be...
0
8457
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
8788
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
8646
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
7390
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
6203
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
4200
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...
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1778
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.