Mar 20, 2009, 10:42 PM
A problem AjaxMethod and AjaxEvent
hi
I want to load a graphic. the question is : i place my function in the page_load and works great. i want to do the same with a button but it doesn´t modify the graphic i did it with Microsoft Ajax and placed the button into an update panel and updated it. Is there something similar for Coolite or a property because i did it with and AjaxMethod and AjaxEvent and didn´t modify the chart.
I want to load a graphic. the question is : i place my function in the page_load and works great. i want to do the same with a button but it doesn´t modify the graphic i did it with Microsoft Ajax and placed the button into an update panel and updated it. Is there something similar for Coolite or a property because i did it with and AjaxMethod and AjaxEvent and didn´t modify the chart.
[AjaxMethod]
public void LoadData()
{
//these are the params for the linear graphic
double[] yval1 = { 15, 24, 38, 4, 59 };
string[] xval1 = { "john", "Mary", "Ralph", "Betty", "Morphy" };
Chart1.Series["Series1"].Points.DataBindXY(xval1, yval1);
}
Aspx code for tha AjaxMethod:<ext:Button ID="Button1" runat="server" Text="Carga Encuesta" Icon="Accept">
<Listeners>
<Click Handler="Coolite.AjaxMethods.LoadData();" />
</Listeners>
</ext:Button>
public void LoadData()
{
//these are the params for the linear graphic
double[] yval1 = { 15, 24, 38, 4, 59 };
string[] xval1 = { "john", "Mary", "Ralph", "Betty", "Morphy" };
Chart1.Series["Series1"].Points.DataBindXY(xval1, yval1);
}
<ext:Button ID="Button1" runat="server" Text="Accept" Icon="Accept">
<AjaxEvents>
<Click OnEvent="Button1_Click">
<EventMask ShowMask="true" MinDelay="300" Msg="Loading..." />
</Click>
</AjaxEvents>
</ext:Button>