Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 6th, 2008, 09:10 AM
Authorized User
 
Join Date: Feb 2008
Location: Bangalore, A.P, India.
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Running Totals in a Gridview

Dear all,

I got a gridview with template columns
col 1: ddlist with Article type
col 2:Quantity a textbox which is entered by the user
col 3:Rate per Item a textbox which is entered by the user
col 4:Total which is a Label =col2 * col3; which must be automatically displayed when control goes to next row.....

and there is a label in the footer of the gridview which should display the total of the col4:

which event of the gridview we must write the code...

Regards,

AMR
  #2 (permalink)  
Old March 6th, 2008, 09:20 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

RowDataBound will work. http://www.google.com/search?q=GridV...x=&startPage=1

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========
  #3 (permalink)  
Old March 6th, 2008, 10:16 AM
Authorized User
 
Join Date: Feb 2008
Location: Bangalore, A.P, India.
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

parson,

plz keep in mind that i got 2 textboxes to enter.and RowDataBound works only for boundfields i think...and these 2 textboxes are not databound..

Thank you,
AMR
  #4 (permalink)  
Old March 6th, 2008, 10:24 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

If your not databinding anything from a database why are you using a gridview?

What do you mean by:
"which must be automatically displayed when control goes to next row"

Since this ultimately requires user input before the value of column 4 can be determined, I am not sure. You have not indicated that there are any other round trips to the server once the grid is displayed which means you will probably have to use JavaScript.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with totals rsm42 ASP.NET 1.0 and 1.1 Basics 0 December 15th, 2006 01:18 PM
Totals not accurate! dba123 Reporting Services 1 February 5th, 2006 10:53 PM
Grouping and totals btado XML 4 July 1st, 2005 03:08 AM
how can i display the totals only squarefish Classic ASP Databases 4 November 9th, 2004 07:23 AM
Totals bjackman Access 1 February 8th, 2004 09:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.