|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Variable with other variableHow 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 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: Show quoteHide quote > 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 > 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 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: Show quoteHide quote > 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 >
How getting eventhandler attached to an event?
Simple word count Win32API - FindFirstFile() in VB.NET single to string problem My app as system process Simple TCP communications examples Thread terminating instantly How to move the mouse around in vb.net Move emails (.msg files) between an Outlook inbox and a file direc How to simulate mouse click in vb.net |
|||||||||||||||||||||||