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

Home Posts Topics Members FAQ

Change Dynamic control properties at run time

I'm creating webcharts control dynamically based on user input as to
how many charts they would like to see. I'm running into problem as to
how to set properties for those charts at run time so they behave and
look all the same.

Creating dynamic chart code looks something like this....

/////////////////////////////////////////////////////////////////////////////////
Sub CreateChartControl(ByVal sender As Object, ByVal e As EventArgs)
Dim ds1 As DataSet = CreateDataSet()
Dim charttest As ColumnChart = New ColumnChart

For Each row As DataRow In ds1.Tables(0).Rows
charttest.Data.Add(New ChartPoint(row("LNAME").ToString,
CType(row _

("AGE"), Integer)))
Next

Dim z As Integer

For z = 1 To 3
ReDim Preserve mycharts(z)
mycharts(z) = New ChartControl
form1.Controls.Add(mycharts(z))
mycharts(z).Visible = True
mycharts(z).Charts.Add(charttest)
mycharts(z).RedrawChart()
Next z
End Sub

///////////////////////////////////////////////////////////////////////

Is there a way to call a routine from FOR loop to format each chart
control and set the properties.

Here are some chartcontrol properties i would like to change at run
time...

<web:ChartControl Runat="server" ID="chartControl1"
ChartPadding="30"
BottomChartPadding="20"
TopPadding="20"
Padding="20" Width="848px" Height="438px"
BorderStyle="outset" GridLines="Both"
Legend-Position="Bottom" Legend-Width="30">
<Background Type="LinearGradient"
Color="#C0FFC0"
EndPoint="900, 900"
LinearGradientMode="BackwardDiagonal"
/>
<Border Color="102, 153, 255" />
<ChartTitle Text="Web Chart Example"
Font="Tahoma, 12pt,
style=Bold" ForeColor="White"

StringFormat="Center,Near,Character,LineLimit" />
</web:ChartControl>

Thanks,
Nick

Jan 6 '06 #1
0 1897

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

Similar topics

1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
3
by: MikeY | last post by:
Hi Everyone, I am working in C#, windows forms.My question is this. All my button dynamic controls properties are present and accounted for except for the"FlatStyle" properties. I can't seem to...
3
by: Guy Harwood | last post by:
Hi, I have designed a textbox that inherits from the System.Windows.Forms.Textbox control. when the control is readonly the back color changes to a light blue to indicate that it is frozen. ...
4
by: Richard Abraham | last post by:
I have created a new class ServiceTimer based upon the .NET System.Timers.Timer class. This has a new property CollectionIntervalMinutes which I expected to be added to the 'Behavior' section of the...
6
by: MikeY | last post by:
Hi Everyone, Does anyone know where I can get my hands on a sample with source code of a simple dynamic button control in C# Windows form. I am looking for a sample that uses a class library...
1
by: sleigh | last post by:
Hello, I'm building a web application that will build a dynamic form based upon questions in a database. This form will have several different sections that consist of a panel containing one to...
0
by: optimizeit | last post by:
What I am attempting to do is import an Excel Workbook and display the worksheets in a datagrid dynamically. I am very close to getting this to work. I have to this point successfully imported a...
0
by: Steve Funk | last post by:
All, I have searched all around and have not yet found the answer to this nor a solution. Hopfully it will be easy to overcome. Here is what I am trying to do: I'm trying to build a wizard...
9
by: Tarscher | last post by:
hi all, I have this seemingly simple problem. I have lost a lot of time on it though. When a user selects a value from a dropdownlist (static control) a dynamic control is generated. I have...
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
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
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...
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...

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.