473,378 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Total items

Hi, I have a grid binded to a DataTable wich shows

Prod Qtt Price Total
(Price*Qtt)

Is there any way the last line/last column be generated automatically with
the sum of the total column? Or should it be done manually with some loop
and variables?

Thanks!
Jun 27 '08 #1
4 994
"Paulo" <er********@terra.com.brwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
Hi, I have a grid (binded) bound to a DataTable wich shows
Is there any way the last line/last column be generated automatically with
the sum of the total column? Or should it be done manually with some loop
and variables?
Google is your friend:
http://www.google.co.uk/search?sourc...iew+Totals+row
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jun 27 '08 #2
check this out:
http://www.aspnet101.com/aspnet101/a...=GVFooterTotal

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
"Paulo" <er********@terra.com.brwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
Hi, I have a grid binded to a DataTable wich shows

Prod Qtt Price Total
(Price*Qtt)

Is there any way the last line/last column be generated automatically with
the sum of the total column? Or should it be done manually with some loop
and variables?

Thanks!

Jun 27 '08 #3
You could do the calculation in the query which pulls the table or
create a view which performs the calculation and pull from the view.

Kelly

Paulo wrote:
Hi, I have a grid binded to a DataTable wich shows

Prod Qtt Price Total
(Price*Qtt)

Is there any way the last line/last column be generated automatically with
the sum of the total column? Or should it be done manually with some loop
and variables?

Thanks!

Jun 27 '08 #4
That would be fine, if there's non conditional clause, in the rowDatabound
event, affecting the full number of viewed records
However, with any clauses, the row databound event would be a preferable
scenario

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
"kelly goff" <kd****@nospam.okstate.eduwrote in message
news:OR**************@TK2MSFTNGP02.phx.gbl...
You could do the calculation in the query which pulls the table or
create a view which performs the calculation and pull from the view.

Kelly

Paulo wrote:
>Hi, I have a grid binded to a DataTable wich shows

Prod Qtt Price Total
(Price*Qtt)

Is there any way the last line/last column be generated automatically
with the sum of the total column? Or should it be done manually with some
loop and variables?

Thanks!

Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: buran | last post by:
Dear ASP.NET Users, How can I get the total number of rows selected by the command text of the datagrid (items in datagrid)? If I use the statement grdSP.Items.Count with the datagrid grdSP with...
1
by: paulsmith5 | last post by:
Hi, Given that I have an two integers - firstly the total number of items and secondly the number of items per page what is the syntax to give me the total number of pages. For example if there...
3
by: Amelyan | last post by:
I need to get the total number of items/records returned into GridView. If I just do myGridView.Rows.Count, then it just returns me the total number of items on the page. But if I have, 10...
4
by: Rich_C | last post by:
I'm sure this is very simple, but I have very little experience with javascript -- and what I do know isn't helping me here. I have a simple form where users can enter a quantity (qty) and cost...
2
by: HarisHohkl | last post by:
Hi, I've this function in a class to update the total value.but when i try to remove the these row highlight in Bold it crash, what should i do???? void display_total_value() { double...
2
by: sammiesue | last post by:
Hi, I have form with 2 autosummed textboxes ("total" and "casinototal"). I would like to have a grand total textbox ("grandtotal") get its value from summing "total" and "casinototal", but it...
7
lee123
by: lee123 | last post by:
hey all, i have made a order form with all the works. in vb 6 and in this form i have been trying to get a total of the items that a customer would have ordered. to make things make sense i have in...
2
klarae99
by: klarae99 | last post by:
Hello, I am working in Access 2003 on an inventory database. Right now I am working on a report which will be used to fill in forms that our state requires periodically to collect taxes. Right...
1
by: ZiggyShort | last post by:
I need to summate across a number of line items over a group of invoices, then round down on an invoice by invoice basis to the nearest penny. I would then like to get a total of THOSE rounded...
3
by: MyWaterloo | last post by:
I need some help with an inventory type question. To lay the foundation... I have an inventory database that keeps track of parts for rebuilds. The tables are: CATEGORIES which is linked to table...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.