473,715 Members | 6,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculating the total of a column in a data grid: Master/detail

Help - Calculating the total of a column in a data grid --
when data grid is part of Master-Detail set-up

I have setup a Master-Detail form using Visual
Studio.Net. A ListBox is the (Master) and contains a list
of dates. The data grid (Details portion) contains the
details for a selected date (namely, a list of work codes
and hours spent).

I am trying to total the number of hours in the datagrid
(for the selected date (master)).

I tried looping through the data grid using 0 to
the 'VisibleRowCoun t' of the data grid. It worked fine,
until I discovered that it truly is counting only the rows
that the user sees in the data grid. (I guess that is
what they meant by 'VisibleRowCoun t').
Anyway, how do I go about summing up the total number of
hours (in my detail data grid), when the user clicks on
a particular date in my list box (Master).?
Thanks Much --- New to Visual Studio.Net
Nov 20 '05 #1
0 2005

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

Similar topics

4
4857
by: The Bit Bandit | last post by:
Hopefully someone can help me create a query that I'm having some trouble with. I have three tables: invoices, invoicedetails, invoicepayments The fields are: invoices -------- InvoiceNo
1
2508
by: Megan | last post by:
quick summary: i'm having problems trying to group fields in a report in order to calculate percentages. to calculate percentages, i'm comparing the results from my grouped fields to the totals. first, let me say that this is a really long post. i wasn't sure how much information/ background to provide, so i thought more was better than less. i tried to delineate certain areas so that it would be easy to peruse my posting and find...
5
2302
by: keith | last post by:
This may seem simple, but I'm having a bit of trouble figuring out exactly how to do it. I'm accessing a database through an ODBC link, and I have a query that returns only jobs completed that day (it's automatically generated). 1 user may finish 10, 20, or 50 jobs a day, but there can be at least 20-50 users per day, and they're always going to be different. The users aren't going to return, or if they do, it's always going to be under...
2
1836
by: Christopher Weaver | last post by:
I have a DataSet with two tables and a DataRelation. When I populate the DataSet and define a master detail relationship through the DataRelation, the grid bound to the master table shows both the master and detail rows while the grid bound to the detail table shows the detail rows for all of the master table rows. I would like the grid bound to the detail table to show the detail rows related to the each master row as the user moves...
1
1192
by: TENZEEL. | last post by:
Hello All. I want to reperesent the Master and Child data in Data Grid in Asp.net. In Master Data row it only shows the key value. and in detail after the master row it shows the value againt that key value. Then again master value and then its detail. plz send me the code and way. tahnx tenzeel.
0
1027
by: HS1 | last post by:
Hello I created a master and a detail table using 2 dataGrids for Client and Jobs tables with a relationship With the detail grid, I create some textboxes to present a record of Jobs table (and also to insert new data for this table) The master and detail grids work well. However, the textboxes does not present the current record in the Job grid.
1
1568
by: HS1 | last post by:
Hello all - I have a master and a details table presented in two datagrid - I also have some text boxes that present the values from any record in the master table. This also helps to enter new data for the master table. I also have a Add button to add new data Me.BindingContext(masterGrid.DataSource, "masterTable").AddNew()
8
6370
by: Doug Bell | last post by:
Hi, I need to create a function that will return the number of columns in a passed reference to a DataView. I can find the number of columns in its underlying Data table but have not been able to find a way of determining the column count in the DataView. Thanks for any assistance.
4
4128
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi I have a GridView that is displaying master records. Some of these records have child records. I would like to a column to my master GridView such that for each master record that has detail records, it displays a hyperlink that then takes the user to the details page. If a master record doesn't have any children, I just want it to display its ID with no hyperlink.
0
9343
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9198
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9104
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9047
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7973
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4477
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3175
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2541
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2119
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.