On 11/30/16, 12:44 AM, "sankar" <santanu4...@gmail.com> wrote:

>I was recently testing 0.8.0 FlexJS nightly build, and I must say binding
>is
>more responsive here than 0.7.0 version. I was testing by the example
>project 'DataGridExample', and my interest was to see if data binding is
>working in grid item renderer as well. Is this doable with present nightly
>build?
>
>At runtime upon a button click I tried to modify an item row in
>/MyInitialView.mxml/ as this:
>
>> private function onButtonClicked():void
>> {
>>      ProductsModel(applicationModel).productList.source[1].image =
>> "assets/smallorangerect.jpg";
>> }
>
>I tit-bit tried to dispatch event upon change here and there too, but that
>didn't effect DataGrid UI change, get/set method in DataItemRenderer also
>not being called. 
>
>Is there any way in current nightly build that we can meet the above
>requirement?

I assume you are still using the ProductItemRenderer in the example?  It
is written in ActionScript, so there is no compiler-generated data-binding
in the renderer.  Because of the pay-as-you-go philosophy, the data
provider used in the example does not dispatch collection change events,
and the DataGrid and renderers aren't listening for it.

You should be able to convert ProductItemRenderer to MXML and use
data-binding, or just have the AS version listen for the appropriate event
fired from the data item.

HTH,
-Alex

Reply via email to