Solved

ASP Boundfield Datafield pointed to an object

Posted on 2009-05-15
3
1,229 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
EOF BOF error classic asp 8 42
ASP.net VB.net gather value of text box text change 4 39
Bypass cross origin issues on development site 3 63
Questions about INCLUDE FILES 2 17
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
A short film showing how OnPage and Connectwise integration works.

914 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