By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,551 Members | 2,710 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,551 IT Pros & Developers. It's quick & easy.

Change Dynamic control properties at run time

P: n/a
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)))

Dim z As Integer

For z = 1 To 3
ReDim Preserve mycharts(z)
mycharts(z) = New ChartControl
mycharts(z).Visible = True
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

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

StringFormat="Center,Near,Character,LineLimit" />


Jan 6 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.