Re: Set Focus at TextInput Inside Spark List ItemRenderer
This post was updated on .
If I'm understanding what you mean, you would need to control it via data.
The element of the collection you pass into the dataProvider could have a property that
indicates whether the TextInput associated with that piece of data should
have focus. Then in the script for the ItemRenderer you override the set
data method and set focus based on the data passed in. There is no good way
to access individual item renderers within an IItemRendererOwner as far as I
know, nor is it good practice to try to do so. Item renderers should be
controlled through the data they are given. So at any point that you want to change the focus you would change the property on the data object and then refresh the collection if needed (depending on the bindings in your data properties and such you might have to do that manually via ICollectionView's itemUpdated method)