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

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 985

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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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: 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
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
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...

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.