Hello,
from a flex point of view you can certainly create an application that lets the user select which ticker to visualize in the grid. Just change the items array composing it with user input
[syntax="JS"]public var items:Array = new Array("item1","item2","item3","item4","item5","item6","item7","item8","item9","item10");[/syntax]
Assuming you want to use the grid (automatic binding) and not the text view (manual writing), if you need to change the list dynamically you have 3 options:
- Unsubscribe from the subscribed VisualTable and create a new one to be subscribed to [syntax="JS"]public function changeSubscription():void {
client.unsubscribeTable(visualTable);
visualTable = new VisualTable(userSelectedArray,fields,"MERGE");
visualTable.setSnapshotRequired(true);
visualTable.addEventListener(EndOfSnapshotEvent.END_OF_SNAPSHOT,onEOS);
visualTable.addEventListener(LostUpdatesEvent.LOST_UPDATES,onLost);
visualTable.addEventListener(UnsubscriptionEvent.UNSUBSCRIPTION,onUnsub);
visualTable.addEventListener(CollectionEvent.COLLECTION_CHANGE,onCollChange);
tableView.dataProvider = visualTable;
client.subscribeTable(visualTable);
}[/syntax]
this way each time a single item enters or exits the list you have to resubscribe the entire table.
- Extend the ArrayCollectionclass to be binded with the DataGrid . This way you can control in each moment which items are visualized inside the grid and you can subscribe and unsubscribe single items internally with mono-item NonVisualTables.
This way could be a little tricky if you're not familiar with Flex
- You could also update an ArrayCollection externally (e.g. without extending it), you can see an example here
From the adapter point of view, item1 - item30 are generated by the adapter code. If you need to use actual data you should implement your own data adapter to be connected with your feed.
Let me know if you need further info