Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 29th, 2013, 11:00 AM
Authorized User
Points: 92, Level: 1
Points: 92, Level: 1 Points: 92, Level: 1 Points: 92, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2012
Posts: 19
Thanks: 6
Thanked 0 Times in 0 Posts
Default Problems with GridView

In my application I need to have the value placed into one field to be the result of a calculation based on values in two other fields. I tried to do this with the following jQuery:
Code:
   <script type="text/javascript">
        $(function () {
            $("input[type='text']").change(function () {
                var unitNetPrice = (this.value);
                var quantity = $(this).prev().prev();
                var netPrice = quantity * unitNetPrice;
                $(this).next().next().attr('value', netPrice);
            });
        })
    </script>
I was hoping that this would fire while the user is in Edit mode on the row and after the user has entered the "unitNetPrice". It also assumes that the user has already entered "quantity". But nothing happens. Is there a small glitch in this approach or is this not the way to approach this?

Another problem I just noticed is how to validate the user's input. When I enter the DataFormatString, that is what is displayed in the non-edited rows instead of the actual data.
Reply With Quote
  #2 (permalink)  
Old March 29th, 2013, 11:11 AM
Imar's Avatar
Wrox Author
Points: 72,038, Level: 100
Points: 72,038, Level: 100 Points: 72,038, Level: 100 Points: 72,038, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,080
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Since this is not related to my book directly, try posting this in the General ASP.NET category from this list: http://p2p.wrox.com/asp-net-4-539/ That way, you'll attract more viewers. If you post there, consider expanding your problem description and sample code.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView Problems Bajrang ASP.NET 2.0 Basics 0 May 16th, 2007 05:53 AM
Gridview checkbox problems pauliehaha ASP.NET 2.0 Professional 1 May 3rd, 2007 04:14 AM
Multiple problems with Login system, GridView hindereduseless ASP.NET 2.0 Professional 0 May 3rd, 2006 01:13 AM
multiple problems with logins and gridview hindereduseless ASP.NET 2.0 Basics 0 May 3rd, 2006 01:01 AM



All times are GMT -4. The time now is 12:23 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.