473,480 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DatagridView unbound Column

Hi All
I have a 2005vb.net Form with 2 datagrids with a perent child relationship.
On the child datagrid I have 2 unbound columns which are derived from other
columns in the grid. And it works fine. The question: how do I sub total an
unbound calculated column in the child datagrid and get to recalculate for
each perent record?

TIA
johnb
Jul 27 '08 #1
4 3176
johnb wrote:
Hi All
I have a 2005vb.net Form with 2 datagrids with a perent child
relationship. On the child datagrid I have 2 unbound columns which
are derived from other columns in the grid. And it works fine. The
question: how do I sub total an unbound calculated column in the
child datagrid and get to recalculate for each perent record?
Add a column to the parent datatable, with an expression something like
"Sum(Child(RelationName).ChildColumnName)"
Jul 27 '08 #2
Hi Steve
Thanks for the reply. I was hoping to place the subtotal textbox on the form
rather than in the parent grid. Any suggestions?
johnb

"Steve Gerrard" wrote:
johnb wrote:
Hi All
I have a 2005vb.net Form with 2 datagrids with a perent child
relationship. On the child datagrid I have 2 unbound columns which
are derived from other columns in the grid. And it works fine. The
question: how do I sub total an unbound calculated column in the
child datagrid and get to recalculate for each perent record?

Add a column to the parent datatable, with an expression something like
"Sum(Child(RelationName).ChildColumnName)"
Jul 28 '08 #3
JohnB,

A textbox assumes that you have only one parentrow.

Steve gave you a fine solution as the latter is not the fact.

Otherwise have a look at the compute

http://msdn.microsoft.com/en-us/libr...e.compute.aspx

Cor
"johnb" <jo***@discussions.microsoft.comschreef in bericht
news:11**********************************@microsof t.com...
Hi Steve
Thanks for the reply. I was hoping to place the subtotal textbox on the
form
rather than in the parent grid. Any suggestions?
johnb

"Steve Gerrard" wrote:
>johnb wrote:
Hi All
I have a 2005vb.net Form with 2 datagrids with a perent child
relationship. On the child datagrid I have 2 unbound columns which
are derived from other columns in the grid. And it works fine. The
question: how do I sub total an unbound calculated column in the
child datagrid and get to recalculate for each perent record?

Add a column to the parent datatable, with an expression something like
"Sum(Child(RelationName).ChildColumnName)"

Jul 28 '08 #4
Cheers Cor.

I'm working on it. Although my brain is having difficulty. I'll come back.

johnb
"Cor Ligthert [MVP]" wrote:
JohnB,

A textbox assumes that you have only one parentrow.

Steve gave you a fine solution as the latter is not the fact.

Otherwise have a look at the compute

http://msdn.microsoft.com/en-us/libr...e.compute.aspx

Cor
"johnb" <jo***@discussions.microsoft.comschreef in bericht
news:11**********************************@microsof t.com...
Hi Steve
Thanks for the reply. I was hoping to place the subtotal textbox on the
form
rather than in the parent grid. Any suggestions?
johnb

"Steve Gerrard" wrote:
johnb wrote:
Hi All
I have a 2005vb.net Form with 2 datagrids with a perent child
relationship. On the child datagrid I have 2 unbound columns which
are derived from other columns in the grid. And it works fine. The
question: how do I sub total an unbound calculated column in the
child datagrid and get to recalculate for each perent record?


Add a column to the parent datatable, with an expression something like
"Sum(Child(RelationName).ChildColumnName)"


Jul 28 '08 #5

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

Similar topics

4
10218
by: dm1608 | last post by:
Hello, I have a DataGridView control in VB.NET 2005 that I would like to iterate thru row by row and parse out the individual columns into variables. Can someone provide me example code or direct...
1
2721
by: David Veeneman | last post by:
I've added an unbound column to a bound DataGridView, and I want the unbound column to be the last column in the grid. But whenever I recompile, the unbound column is the first column in the grid....
6
18903
by: Mark | last post by:
Hello, How do you search a datagridview for given column values? Any help would be greatly appreciated! Thanks in advance
2
581
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Is there a way to take a datagridview which is bound to a datasource, add an "unbound column" and bind that column to a different binding source for a diffent table? When I attempt to edit that...
1
7416
by: sklett | last post by:
I've got a strange situation here. I have a databound DataGridView that also has un-bound columns. When the view loads, I want to update the values of the unbound columns. If I attempt to modify...
1
2889
by: Chalkie | last post by:
Hello, I've hit what appears to be a serious problem with an unbound datagridview control that Ive added to a VB.Net program. Inadvertently I named one column 'Name' and a second 'Size'. The...
3
4194
by: Frederik | last post by:
Hi group, I have a DataGridView that is mainly consisting of data bound columns. One column however is unbound. I'm not able to sort the grid on this column! Is that normal behaviour? If so,...
4
2360
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I use unbound DataGridView controls in my form (simply because I have to manually message my data before populating the DataGridView with it). Say I clear all the info from the DataGridView: ...
0
5632
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
6920
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
7060
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,...
0
7106
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...
1
6760
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
7022
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
5365
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,...
0
3013
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...
0
3004
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1311
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 ...

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.