473,472 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Panels and UserControls

Hello,

I have a panel that is being filled with UserControls based on the Number of
Rows inside a Dataset. This works great, but when I dump the contents into
a new table it does not work the way it should. i.e.

Dim aControl As UserControl
OrderDataset.Tables("Temp").Clear()
Dim ADatarow As DataRow

For Each aControl In OrderPanel.Controls
ADatarow = OrderDataset.Tables("Temp").NewRow()
ADatarow("ItemID") = CType(aControl, OrderControl).Item
ADatarow("AssetID") = CType(aControl, OrderControl).TheIndex
ADatarow("SDescription") = CType(aControl, OrderControl).Description
ADatarow("SpaceDescription") = CType(aControl, OrderControl).Space
ADatarow("DepartmentDescription") = CType(aControl, OrderControl).Department
ADatarow("ShipTo") = CType(aControl, OrderControl).ComboShip.SelectedIndex
OrderDataset.Tables("Temp").Rows.Add(ADatarow)
Next

if there are 4 controls inside the panel four rows are placed inside table
"Temp" but Row 0 and Row 3 are always the same (but in reality they are
not). It does not matter how many rows there are the first and last are
always the same. i.e.

Row 0 ItemID = 1234
Row 1 ItemID = 5678
Row 2 ItemID = 9876
Row 3 ItemID = 1234 (but should be 3423)

What am I doing wrong?

Any Suggestions will be greatly appreciated.

Thanks,
Chuck
Nov 19 '05 #1
0 988

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

Similar topics

1
by: jacobryce | last post by:
Hi, I have a windows form with a few splitcontainerpanels that each load with a usercontrol. I would like the user to be able to move the usercontrols around so that they can customize their...
1
by: AndrewDucker | last post by:
I've just started working with some people that have an odd setup and I'm wondering if someone can point out a better way of doing things (or what I'm doing wrong). They have a base form class,...
8
by: Søren Dreijer | last post by:
Hi, I realize this is a very common problem, but even though I've scoured the Internet for resources, I can't seem to solve this issue :| I currently have a very simple application. It...
4
by: A. Haeser | last post by:
Hello, I have build a little application with dynamic usercontrols on a panel. Sometimes there are 5 userscontrols on the panel, sometimes much more. It is database driven, everey usercontrol...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
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...

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.