473,466 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Heirarchical DataBinding in Windows Forms.

Hello:

I am sure this is a common need, so I hope I can be brief.

I have a heirarchical database setup such that one customer can have
multiple contracts and those contracts can have multiple child
records, and so on. I would like very much to be able to move from one
customer to the other and for my code to automatically retrieve the
associated contracts and repopulate the Form.

Before I venture on writing some code of my own, I wanted to make sure
something like this doesn't already exist.

If it doesn't exist, I plan on writing an derived BindingSource that
recieves a parent BindingSource and calls an event handler to detect
when Current changes (the PositionChanged event). The event handler
will be responsible for populating the underlying DataSource of the
child BindingSource.

From this, I will be able to isolate the repopulation from the
interface. However, I have to deal with events such as the parent
BindingSource being cleared. That is why I was hoping to escape the
confusion and use an existing code set.

Let me know whether I should start writing this code or not. If there
is a Form control or property that does this, that would be nice to
know about too.

Thanks,
Travis
Jan 3 '08 #1
1 1305

Infragistics has a grid, which allow Hierarchal data, if I recall correctly.

It cost$, but may be worth it to see what they have.

I think their distribution license is easy to deal with.

<je**********@gmail.comwrote in message
news:79**********************************@h11g2000 prf.googlegroups.com...
Hello:

I am sure this is a common need, so I hope I can be brief.

I have a heirarchical database setup such that one customer can have
multiple contracts and those contracts can have multiple child
records, and so on. I would like very much to be able to move from one
customer to the other and for my code to automatically retrieve the
associated contracts and repopulate the Form.

Before I venture on writing some code of my own, I wanted to make sure
something like this doesn't already exist.

If it doesn't exist, I plan on writing an derived BindingSource that
recieves a parent BindingSource and calls an event handler to detect
when Current changes (the PositionChanged event). The event handler
will be responsible for populating the underlying DataSource of the
child BindingSource.

From this, I will be able to isolate the repopulation from the
interface. However, I have to deal with events such as the parent
BindingSource being cleared. That is why I was hoping to escape the
confusion and use an existing code set.

Let me know whether I should start writing this code or not. If there
is a Form control or property that does this, that would be nice to
know about too.

Thanks,
Travis

Jan 3 '08 #2

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

Similar topics

1
by: Ben R. | last post by:
Hi, I'm fairly familiar with the databinding model for ASP.NET, but now I'm trying to do the same with a C# windows forms application. I'm noticing several differences: Firstly, there never...
1
by: Kevin | last post by:
Hi Al When I have a text box, list box, and a datagrid, how does a CurrencyManager relate to all these controls(seeing as though the datagrid uses Complex binding and textbox and list box use...
6
by: eye5600 | last post by:
Is there a cure for the problems using databinding with a DateTimePicker? I find that a) sometimes it works, sometimes it doesn't, and b) it fails silently causing all databinding on the DataSet...
3
by: BobforeApples | last post by:
Hi All, I was trying to apply databinding to a custom collection as in the MSDN Magazine article found in the August, 2005 issue. After converting the code in the article to C# and applying it to...
2
by: AJ | last post by:
Hi all, I am posting from the web based forum on msdn.com. My question is, how do i create the heirarchical table like controls that this forum uses to display posts. Any tutorials, links...
2
by: Charlie | last post by:
Hi: I have one-to-many relation (customer > invoice > invoice_items) that I would like to display on web page using Repeater control. Can the control be bound to a heirarchical dataset to...
4
by: dtblankenship | last post by:
Hello everyone, I know this question has been asked many times in the forums, and after spending a few days reading, I am still confused as to the answer. I have a ListBox (lstBox),...
3
by: funkyMonkey | last post by:
I'm binding date fields from entity objects and formatting the output in the text box in short date format. Code: BindDateField(Me.txtCheckIn, "Text", reservation.BookingDetail, "CheckIn")...
11
by: =?Utf-8?B?R29rdWw=?= | last post by:
I am struck up with a problem and want anyone here to help me out. I am a beginner in .NET trying to learng DataBinding concepts. I have binded 4 text boxes with a dataset but when I say...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
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,...
0
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
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.