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

Home Posts Topics Members FAQ

Variable with other variable

Hi

How can I include in name of my variable value of other variable? I
have following code:
For x = 0 To 10

Dim column As New DataGridTextBoxColumn
column.MappingName = magazyny(x)
column.HeaderText = magazyny_wys(x)
column.Width = 100
TblStyle.GridColumnStyles.Add(column)

Next

and what i can do with variable Column?! I need sth like that:

Dim column + x As New DataGridTextBoxColumn

Or maybe u know other way to add several columns to tablestyle using
For loop

Thx Mrozu

May 6 '06 #1
3 1045
Why do you think that you need that? Is there some problem with the code
as it is now?

You can use an array if you want to keep references to the columns.

Mrozu wrote:
Hi

How can I include in name of my variable value of other variable? I
have following code:
For x = 0 To 10

Dim column As New DataGridTextBoxColumn
column.MappingName = magazyny(x)
column.HeaderText = magazyny_wys(x)
column.Width = 100
TblStyle.GridColumnStyles.Add(column)

Next

and what i can do with variable Column?! I need sth like that:

Dim column + x As New DataGridTextBoxColumn

Or maybe u know other way to add several columns to tablestyle using
For loop

Thx Mrozu

May 6 '06 #2
God... it really works... I don't know what's going on:) Thx man.

But is it possible to add to variable name value of other variable?
Thx Mrozu

May 6 '06 #3
No, there is no way to create variables dynamically. If you want to
store named values dynamically you should use a collection. Or if the
names only differ by index like in your example, an array.

Mrozu wrote:
God... it really works... I don't know what's going on:) Thx man.

But is it possible to add to variable name value of other variable?
Thx Mrozu

May 6 '06 #4

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

Similar topics

83
by: Alexander Zatvornitskiy | last post by:
Hello All! I'am novice in python, and I find one very bad thing (from my point of view) in language. There is no keyword or syntax to declare variable, like 'var' in Pascal, or special syntax in...
2
by: Alan Hewat | last post by:
I have a relatively modest mySQL database with a PHP interface (70,000 entries). On a standard Dell Dimension 4400 (1.9 GHz with 512 Mbytes) running Suse 8.1 a typical query takes 0.66 sec with no...
134
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
3
by: Datta Patil | last post by:
Hi , #include<stdio.h> func(static int k) /* point2 : why this is not giving error */ { int i = 10 ; // static int j = &i ; /* point 1: this will give compile time error */ return k; } /*...
15
by: joun | last post by:
Hi all, i want to create in my asp.net application a custom server variable, so i can retrieve later in other pages (even asp or perl) with request.servervariables("HTTP_mycustomvariable") ...
2
by: simon | last post by:
hello, what i'm looking to do is store the path of the app on a the server for reuse in the site. my thoughts so far are... -make a key in the web.config file -retrieve the value in globals.asax...
61
by: Marty | last post by:
I am new to C# and to structs so this could be easy or just not possible. I have a struct defined called Branch If I use Branch myBranch = new Branch(i); // everything works If I use Branch...
53
by: fdmfdmfdm | last post by:
This is an interview question and I gave out my answer here, could you please check for me? Q. What are the memory allocation for static variable in a function, an automatic variable and global...
1
pbmods
by: pbmods | last post by:
VARIABLE SCOPE IN JAVASCRIPT LEVEL: BEGINNER/INTERMEDIATE (INTERMEDIATE STUFF IN ) PREREQS: VARIABLES First off, what the heck is 'scope' (the kind that doesn't help kill the germs that cause...
0
by: zman77 | last post by:
EDIT: -- forgot to mention... I am using Visual Studio 2005, on Win XP, on an intel machine Hi. This is my first post, though I've "lurked" for a while because I find these forums very helpful....
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,...
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
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...
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: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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.