473,387 Members | 1,766 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.

Table In VB.net Application Form

I have created an ASP.net page with a nice looking table in it that takes values from an Access database (and changes colour depending on its value) and iterates the number of hours a child is with my wife (Childminding Planner) to each cell with column headers for each hour for a certain day. This works fine
But
I cannot for the life of me find a solution that will allow me to add a table to a VB.net app form that will do the same.

I even created a table myself out of loads of little textboxes thinking that i would be able to iterate them in an array sort of way, you know a control array. It turns out that control arrays aren't included into vb.net(i miss vb6 so much)

I don't know if i am putting in the wrong keywords for searching but can't find a solution anywhere.

Can anyone help me ? the code is in place, i just need to know how i can place a table object onto the form, It sounds simple enough but beyond me.

thanks in advance
Jun 29 '09 #1
3 2432
OuTCasT
374 256MB
You could create the textboxes on the fly when retrieving the data from the database. So for every value returned from the db a textbox would be created for the item. You could specify where the controls are placed etc.
Jun 30 '09 #2
Hmmm

But i have a complication

For the next child that comes along in the stream read,in the same time slot my code reads if a value is there already in the box and adds that value to create a total value.

So the textbox i create dynamically will have to be referenced somehow.
Jun 30 '09 #3
To illustrate my issue

for the asp table i could do

if varDay = "Monday" and varHour = "08" then
table.Rows(x).colums(y).value = varNumber + varValueAlreadyThere
loop through how many hours the child is with my wife. Updating each field


This works great as i can loop though the fields and assign values

But using textboxes in the standalone app i have to

if varDay = "Monday" and varHour = "08" then
textbox1.text = 1 + textbox1.text
loop through how many hours the child is with my wife by assigning each individual textbox eg
if varNextHour = true then textbox2.text = varnumber + textbox2.text
if varNextHour = true then textbox3.text = varnumber + textbox3.text
if varNextHour = true then textbox4.text = varnumber + textbox4.text


and so on, loads of code. there must be a better way to do it.

I support i could make the gridview look better if there's is no other way

Or, is it possible to import the table used for ASP.net into vb.net stand alone app by referencing the resource ?
Jul 1 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mike S. Nowostawsky | last post by:
I need to be able to create a 2 column table and then based on which column header is clicked on, sort the list by that column so that each table row is sorted properly. If possible there might be...
1
by: Ryan Liu | last post by:
Hi, can someone tell me how to make an application/form blanking at the taskbar with FormWindowState.Minimized form state? I see MSN or Yahoo chat work this way. When a new message arrive, the...
4
by: yanjie.ma | last post by:
Hi, I've got a two part question on table and form design (sorry for the length but it takes a bit to explain). Our sales department uses a look-up table to help the them select the best...
0
by: fswfsw | last post by:
I am using Microsoft visual studio 2005. Also i use windows application form. Now i have met some problem. I don't know how to output "int" or "wchar_t" types in the window application form? ...
1
by: Ste | last post by:
Hi, I would like to have current date automatically enter into a form that is based on a table, so that from report I can tell how many records I have entered for the day. If I use date() on...
3
by: alok kumar | last post by:
Hi , This is Alok here. I want to creat a windws application form using c#. It contains a Tree View . I want to access all the Drives (C:\ , D:\ , E:\ etc.) and included directories and files in...
4
by: itsmenarwal | last post by:
I am editing my application form.So what i am Doing telling you here..I am already logged in * First of all i am giving a edit link(edit_profile1.php) on my home page * NOw i am asking...
1
by: Rosemary Iyodo | last post by:
how can i store pictures from an application form with the datas via php into database and be able to specified the type,and display it from the database via php showing everything in form with...
1
by: Joanna c | last post by:
I am new to Access 2007. I have used a MS template (student Database) i have successfully made minor changes. Have made a query to state exact age however cannot get the age to appear in the table or...
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:
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.