Hi,
The DataProvider document identifies the following events:
addItems - The firstItem and lastItem properties will indicate the
indices of the new items added.
removeItems - The firstItem and lastItem properties will indicate
the indices of the removed items.
updateItems - The firstItem and lastItem properties will indicate
the indices of the updated items.
sort - The entire data set has been sorted.
updateField - This means that a cell or field in the data for that
row/item has been edited. The firstItem and lastItem properties will
indicate the index of the updated item, fieldName will name which
field in the item changed.
filterModel - The data set has been filtered, or the filter has been
changed or removed.
updateAll - this means that the data has been entirely replaced or
that the data has changed so significantly that the component
displaying the data should recheck the number of items and request
all the data again.
My question is when should I use the filterModel vs the updateAll.
I have a filtered DataProvider that extends an Array. When a filter
is applied, it uses the Array functions splice(0) to remove the
elements from the Array and then populates it using push(). When
this is done I want to trigger the appropiate event (not sure if it
is filterModel or updateAll).
Any siggestions on what I should be using ? I am using the array
functions rather than the dataProvider functions removeAll, addItem
as I do not want to trigger a set of events while I am updating the
data provider. An alternative would be to simple create and
populate a new DataProvider.
Any suggestions / comments on my alternatives ?
Thanks.
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/