Solved

ASP Boundfield Datafield pointed to an object

Posted on 2009-05-15
3
1,238 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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/…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 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