Solved

Entity Framework question  Part 3, asp.net

Posted on 2014-11-29
3
238 Views
Last Modified: 2014-12-09
I am trying to replace SoftwareID (under Title column) with tblSoftware.Title. Likewise, put tblSoftware.UnitPrice in this field (temporarily it is showing the value from Quantity field). Lastly, have a calculated field S. Total (Quantity * UnitPrice).

If this was a single gridview, I would cycle through the gv and multiply Quantity * UnitPrice values and place it in S. Total. But here the situation is different. We have three nested grid view which makes it a bit complicated.

Question: How to pull Title and UntiPrices from tblSowtware (using EF); and adding S. Total calculated field?

FYI: The project solution (EF_YouTube.zip about 1.1 MB with db file in it is at:  https://onedrive.live.com/?cid=420CDD6A13807C9B&id=420CDD6A13807C9B%21116 for additional information. It is developed in vs2012 and uses SQLEXPRESS12) EF7EF6
0
Comment
Question by:Mike Eghtebas
  • 2
3 Comments
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 40471823
Hi Mike;

When I download the above project it downloads the project from Part 2 so the extra column, Total Purchase, is not there. Can you upload the latest please.
0
 
LVL 33

Author Comment

by:Mike Eghtebas
ID: 40471836
Sorry about that. I uploaded right one.

Mike
0
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 40473030
Hi Mike;

I am looking at it but seeming I have not worked much with the EntityDataSource control I am finding it limiting. I can not see how to configure it to calculate the total column for you. I am thinking of some how getting a reference to the data context and calculate it that way but then I need to figure out how to fill the column.

You may want to place a Request For Attention and have EE send out some emails to others to see if they can help with this.
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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 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

21 Experts available now in Live!

Get 1:1 Help Now