Solved

ASP Boundfield Datafield pointed to an object

Posted on 2009-05-15
3
1,227 Views
Last Modified: 2012-05-07
I have gridview with an ASP Boundfield that is tied to a collection of objects.  if I set the datafield property to a property of the object, it works perfectly.  However, one of the properties of the object is another object and I need to set the datafield to a property of that second object.  how can I do that?  I tried Datafield="Obj2.Propertyname" where Obj2 is the name of the property of the main object.
0
Comment
Question by:jfb1126
  • 2
3 Comments
 
LVL 19

Expert Comment

by:daveamour
ID: 24401503
If you are in control of the code you could introduce a new property to your 1st object which under the hood - ie in the getter retrieves the property value of the 2nd object - so a kind of proxy property designed to fulfill the limitations of the Gridview.
0
 

Author Comment

by:jfb1126
ID: 24412319
Thanks daveamour,  I thought about that.  if push comes to shove, I could get that code it the main object, but I was hoping for something on the front end before I have to  jump through those hoops.  :P
0
 

Accepted Solution

by:
jfb1126 earned 0 total points
ID: 24520315
What I did was create a template field with an item template of a label, then on Data Binding I was able to populate the field.

0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now