473,396 Members | 1,838 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,396 software developers and data experts.

Master-Detail Datagrid sum up problem

I got master-detail datagrid
in my datagrid (invoicedetail) , aim(as the user type the unit price or no
of unit), the amount will be calculated and the TOTAL amount can be showed
in the form at once.

In my columnchanged event
e.Row("invamt") = e.Row("unitprice") * e.Row("noofunit") *
e.Row("exrate")
drInvInfo =
Me.dsSeaInvInfo.Tables("invoiceHeader").Rows(bmSea InvInfo.Position)
For Each drInvCharges In drInvInfo.GetChildRows("fk_invno")
decTtlAmt = decTtlAmt + drInvCharges("invamt") <--- it
seems fail
Next
Me.txtTotalAmt.Text = decTtlAmt
How can I sum up the detail tables before I update the tables ??
Thanks
Nov 20 '05 #1
1 1335
Hi,

Try this.

decTtlAmt = decTtlAmt + Cdec(drInvCharges("invamt"))

Ken
---------------

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:OQ**************@tk2msftngp13.phx.gbl...
I got master-detail datagrid
in my datagrid (invoicedetail) , aim(as the user type the unit price or no
of unit), the amount will be calculated and the TOTAL amount can be showed
in the form at once.

In my columnchanged event
e.Row("invamt") = e.Row("unitprice") * e.Row("noofunit") *
e.Row("exrate")
drInvInfo =
Me.dsSeaInvInfo.Tables("invoiceHeader").Rows(bmSea InvInfo.Position)
For Each drInvCharges In drInvInfo.GetChildRows("fk_invno")
decTtlAmt = decTtlAmt + drInvCharges("invamt") <--- it
seems fail
Next
Me.txtTotalAmt.Text = decTtlAmt
How can I sum up the detail tables before I update the tables ??
Thanks

Nov 20 '05 #2

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

Similar topics

0
by: webhosting | last post by:
After a failure, we promoted a slave to master. This included renaming the server to the old master's name and ip address, but leaving the server id alone. The new master works fine. We...
4
by: Steve Franks | last post by:
I have this cool nested master page scenario working great. However what is the correct way to be able to access a strongly typed property at the top level master from a content page that has a...
2
by: Jon Spivey | last post by:
Hi, Using VS 2005/VB.net. I need to add a meta description tag and change a stylesheet link from a page based on a master page. Found this article...
3
by: ivanpais | last post by:
Hi, I have a Web User Control, Lets say "Foo.ascx", that contains a button "btnFoo". I have a Master Page "Bar.master", that has a label "lblBar". This label is exposed by a public property...
17
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content...
4
by: Boris Yeltsin | last post by:
OK, on my Master Page I have a control: <a id="hypTabAccount" href="#" runat="server">Account</a> Now, in the code-behind (Root.master.vb) I can refer to it simply thus: ...
7
by: Just Me | last post by:
Hi I have a master page with a control on it, but I need to set a property of that control from the content. my master page is called Admin.Master and the class is Admin. I have tried this
13
by: Kirk | last post by:
I have been reading Scott Allen's article on Master Pages (http:// odetocode.com/Articles/450.aspx) but I am having problems understanding a concept. Specifically, I have created a property...
5
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys I'm trying to make my code as streamlined as possible, and add CSS file references dynamically when they are required, for example, if a page contains a webcontrol, then the related CSS...
4
by: harijay | last post by:
Hi I am new to writing module and object oriented python code. I am trying to understand namespaces and classes in python. I have the following test case given in three files runner , master and...
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: 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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.