I tried to display the line chart from database. In order to display several dynamic linechart in the same place, I add a Combobox which is also connected to the database, so user can select the ID to display the linechart interactively. The following code is working to display the line chart based on the default value from combobox. However, when I change the selected value in the combobox, the linechart did not change. Could you help me please, how to make the linechart change based on the selected value from combobox ? Thank you very much in advanced.
Example of MyDB coulmn : ID , SampleNum, Y1
1 , 1 , 5
1 , 2 , 10
1 , 3 , 4
2 , 1, 3
2 , 2, 15
2 , 3, 6
Regards.
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<div>
</div>
<telerik:RadComboBox ID="RadComboBox1" Runat="server" DataSourceID="ds1"
DataTextField="ID" DataValueField="ID">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
</telerik:RadComboBox>
<asp:AccessDataSource ID="ds1" runat="server" DataFile="~/App_Data/MyDB.mdb"
SelectCommand="SELECT [ID] FROM [Station]"></asp:AccessDataSource>
<telerik:RadChart ID="RadChart1" runat="server" DataSourceID="ds2"
DefaultType="Line" Width="1016px">
</telerik:RadChart>
<asp:AccessDataSource ID="ds2" runat="server" DataFile="~/App_Data/MyDB.mdb"
SelectCommand="SELECT [Y1] FROM [Data] WHERE ([ID] = ?) ORDER BY [SampleNum]">
<SelectParameters>
<asp:ControlParameter ControlID="RadComboBox2" DefaultValue="ID" Name="ID"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:AccessDataSource>
</form>
</body>