Solved

Entity Framework question  Part 3, asp.net

Posted on 2014-11-29
3
241 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 63

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 63

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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!
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

831 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