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

Newb looking for data binding help

Hi all.

I'd like any suggestions on how I can get my data set (not a DataSet)
bound to a couple of controls on a form. Let me start by describing
what my data looks like. Each entry correlates to a piece of equipment
and has the following information:

Two strings, one for a system name and one for equipment name
An integer
An ArrayList (which will contain only strings)

Each data entry has an associated TreeNode and is a child node to a
'system' node. Each node is in a hashtable which then points to the
'equipment's data set.

When the user clicks on an 'equipment' node, I'd like to display just
its data (the integer, and the array list). When a 'system' node is
selected, I'd like to display all of the strings in the arraylists of
that system, and a MIN function of that system's integers.

I thought it would be awesome if I could store the entries in a
dataTable (one row per piece of equipment), bind columns to Text and
ListBoxes. Then when a user selects a node, I find it's system &
equipment name (hashtable lookup to get a datarow), then simply change
the datatable's rowFilter string to display only the selected piece of
equipment or only the selected table's equipment.

That all almost works great. However, the list boxes I am using call
the ToString method of each arrayList instead of displaying each string
within the arrayList. (so I get a list of 'System.ArrayList' entries).

Does anyone have any workarounds, or suggestions as to better
arrainging my datastructure (such as a custom class instead of a table,
forget data binding, etc)

Thanks in advance,

Kevin

Oct 20 '06 #1
3 1354
Kevin,

The first thing that you need to bind are properties.

Therefore a strongly typed generic list will probably be better.

Cor

<ke********@gmail.comschreef in bericht
news:11********************@e3g2000cwe.googlegroup s.com...
Hi all.

I'd like any suggestions on how I can get my data set (not a DataSet)
bound to a couple of controls on a form. Let me start by describing
what my data looks like. Each entry correlates to a piece of equipment
and has the following information:

Two strings, one for a system name and one for equipment name
An integer
An ArrayList (which will contain only strings)

Each data entry has an associated TreeNode and is a child node to a
'system' node. Each node is in a hashtable which then points to the
'equipment's data set.

When the user clicks on an 'equipment' node, I'd like to display just
its data (the integer, and the array list). When a 'system' node is
selected, I'd like to display all of the strings in the arraylists of
that system, and a MIN function of that system's integers.

I thought it would be awesome if I could store the entries in a
dataTable (one row per piece of equipment), bind columns to Text and
ListBoxes. Then when a user selects a node, I find it's system &
equipment name (hashtable lookup to get a datarow), then simply change
the datatable's rowFilter string to display only the selected piece of
equipment or only the selected table's equipment.

That all almost works great. However, the list boxes I am using call
the ToString method of each arrayList instead of displaying each string
within the arrayList. (so I get a list of 'System.ArrayList' entries).

Does anyone have any workarounds, or suggestions as to better
arrainging my datastructure (such as a custom class instead of a table,
forget data binding, etc)

Thanks in advance,

Kevin

Oct 20 '06 #2
Thanks for the reply,

Are you suggesting that instead of storing my entries in a datatable,
store them in a custom generic list, or rather, instead of using array
lists to store the strings, using a generic list there? If its the
later, wouldn't I have the same problem in that, I can't get the
binding control to iterate for each string within the collections?

Regards,

Kevin
Cor Ligthert [MVP] wrote:
Kevin,

The first thing that you need to bind are properties.

Therefore a strongly typed generic list will probably be better.

Cor

<ke********@gmail.comschreef in bericht
news:11********************@e3g2000cwe.googlegroup s.com...
Hi all.

I'd like any suggestions on how I can get my data set (not a DataSet)
bound to a couple of controls on a form. Let me start by describing
what my data looks like. Each entry correlates to a piece of equipment
and has the following information:

Two strings, one for a system name and one for equipment name
An integer
An ArrayList (which will contain only strings)

Each data entry has an associated TreeNode and is a child node to a
'system' node. Each node is in a hashtable which then points to the
'equipment's data set.

When the user clicks on an 'equipment' node, I'd like to display just
its data (the integer, and the array list). When a 'system' node is
selected, I'd like to display all of the strings in the arraylists of
that system, and a MIN function of that system's integers.

I thought it would be awesome if I could store the entries in a
dataTable (one row per piece of equipment), bind columns to Text and
ListBoxes. Then when a user selects a node, I find it's system &
equipment name (hashtable lookup to get a datarow), then simply change
the datatable's rowFilter string to display only the selected piece of
equipment or only the selected table's equipment.

That all almost works great. However, the list boxes I am using call
the ToString method of each arrayList instead of displaying each string
within the arrayList. (so I get a list of 'System.ArrayList' entries).

Does anyone have any workarounds, or suggestions as to better
arrainging my datastructure (such as a custom class instead of a table,
forget data binding, etc)

Thanks in advance,

Kevin
Oct 20 '06 #3
Kevin,

Sorry I readed your message to quick,
As I now read your message again and hope to understand it now well, is it
probably better to use dataviews with your datatable.

Than you can set the rowfilter of the dataview to the clicked part in the
tree.

A little bit like this,
http://www.vb-tips.com/dbPages.aspx?...1-af26354b1fa0

I hope this helps,

Cor

<ke********@gmail.comschreef in bericht
news:11********************@i3g2000cwc.googlegroup s.com...
Thanks for the reply,

Are you suggesting that instead of storing my entries in a datatable,
store them in a custom generic list, or rather, instead of using array
lists to store the strings, using a generic list there? If its the
later, wouldn't I have the same problem in that, I can't get the
binding control to iterate for each string within the collections?

Regards,

Kevin
Cor Ligthert [MVP] wrote:
>Kevin,

The first thing that you need to bind are properties.

Therefore a strongly typed generic list will probably be better.

Cor

<ke********@gmail.comschreef in bericht
news:11********************@e3g2000cwe.googlegrou ps.com...
Hi all.

I'd like any suggestions on how I can get my data set (not a DataSet)
bound to a couple of controls on a form. Let me start by describing
what my data looks like. Each entry correlates to a piece of equipment
and has the following information:

Two strings, one for a system name and one for equipment name
An integer
An ArrayList (which will contain only strings)

Each data entry has an associated TreeNode and is a child node to a
'system' node. Each node is in a hashtable which then points to the
'equipment's data set.

When the user clicks on an 'equipment' node, I'd like to display just
its data (the integer, and the array list). When a 'system' node is
selected, I'd like to display all of the strings in the arraylists of
that system, and a MIN function of that system's integers.

I thought it would be awesome if I could store the entries in a
dataTable (one row per piece of equipment), bind columns to Text and
ListBoxes. Then when a user selects a node, I find it's system &
equipment name (hashtable lookup to get a datarow), then simply change
the datatable's rowFilter string to display only the selected piece of
equipment or only the selected table's equipment.

That all almost works great. However, the list boxes I am using call
the ToString method of each arrayList instead of displaying each string
within the arrayList. (so I get a list of 'System.ArrayList' entries).

Does anyone have any workarounds, or suggestions as to better
arrainging my datastructure (such as a custom class instead of a table,
forget data binding, etc)

Thanks in advance,

Kevin

Oct 21 '06 #4

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

Similar topics

2
by: Xizor | last post by:
Ok, I'm new to PHP and MySQL. I've been going through tutorials, reading the documentation, and looking through web sites. PHP to me seems great! With MySQL it seems even better. However, I'm an...
5
by: Alexandre | last post by:
Hi, Im a newb to dev and python... my first sefl assigned mission was to read a pickled file containing a list with DB like data and convert this to MySQL... So i wrote my first module which...
11
by: The_Kingpin | last post by:
Hi all, I'm new to C programming and looking for some help. I have a homework project to do and could use every tips, advises, code sample and references I can get. Here's what I need to do....
19
by: Simon Verona | last post by:
I'm not sure if I'm going down the correct route... I have a class which exposes a number of properties of an object (in this case the object represents a customer). Can I then use this...
2
by: Heinz Ketchup | last post by:
Hello, I'm looking to bounce ideas off of anyone, since mainly the idea of using Multiple Virtual Inheritance seems rather nutty. I chalk it up to my lack of C++ Experience. Here is my...
9
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New...
12
by: joaotsetsemoita | last post by:
Hello everyone, im completly new to vb.net and I was assigned to do a simple piece of software that just had to select from um db in a MS access data base and insert into a SQL server Database....
3
by: DaveJ | last post by:
Hi everyone, I really was hesitant to post here for fear of seeming foolish but I really am desparate, and do appreciate any opportunity to get answers from real people. So please forgive the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.