Hi I have a Online Trading System in Flex 3.0
The charting is updated via Web Services to an ASP.net SQL Server.
I'm having trouble figuring out the details to make the Controls, specifically
the DataGrid and the OHLC Charts update without a page refresh. The SQL Server
is updated with new data every 15 minutes.
Here is one Object it's a DataGrid that handles open orders. As an example how
do I set this up to auto-poll the SQL server? I think the binding auto-update
is fairly easy, it's the polling interval that I'm curious about. This
particular control is updated at application creation complete() but the Chart
is updated each time a user clicks a Ticker on the DataGrid... A routine to
send a request every 10 minutes would work fine for the DataGrid but for the
Chart, it's not as easy, as the {DataGrid.seletedItem.Ticker} would be unknown.
Any ideas?
Example code:
creationComplete="initData()" >
<mx:WebService id="WsORDERS"
wsdl="http://www.xxxxxxx.net/ORDERS.asmx?WSDL"
fault="WsFaultDg(event)">
<mx:operation name="GetOrdEnt"
result="Orders_result(event)"
fault="WsORDERSDgOp(event)"/>
</mx:WebService>
<orders:DgORDERS id="dgorders"
width="100%" height="50%"
textAlign="center"
dataProvider="{Array_Orders}"
itemClick="onTick()">
</orders:DgOrdEnt>
private function initData():void
if (Array_Orders==null) WsOrders.GetOrdEnt.send();
private function onTick4(): void {
dgOrdEnt.selectedItem.Ticker;
WsChartVt.GetTickers.send(myentTick.entTick);
formOrdEnt.sym = myentTick.entTick;
formOrdEnt.getNews(myentTick.entTick);