Solved

Entity Framework question  Part 3, asp.net

Posted on 2014-11-29
3
232 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
Comment Utility
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
Comment Utility
Sorry about that. I uploaded right one.

Mike
0
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
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.

743 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