PDA

View Full Version : [CLOSED] SchedulerGrid EventStore



Adrian
Aug 16, 2012, 3:30 AM
Hi, we're trialling the Scheduler component and playing with DirectEvents. We're not extending the EventStore, just using the standard model and having trouble getting data using the <ExtraParams>. When an event is added should the direct events be run on the SchedulerGrid or the EventStore? And should the Parameter Value come from Sch.data? Any assistance appreciated.



<DirectEvents>
<Add OnEvent="EventAdded">
<ExtraParams>
<ext:Parameter Name="Record" Value="Ext.encode(Sch.data)" Mode="Raw" />
</ExtraParams>
</Add>
</DirectEvents>

Vladimir
Aug 16, 2012, 1:23 PM
According ExtJS documentation, Add event will fire after adding record or records to a store
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.AbstractStore-event-add

Please note when you bind data to the store then that event will be fired also
Also please note that it is array of records, not single record
So, you can try


<ext:Parameter Name="Record" Value="Ext.encode(records[0].data)" Mode="Raw" />

Adrian
Aug 17, 2012, 4:53 AM
Thanks Vladimir, works great.
Adrian.