I'm wondering if someone can help me.I'm hoping this is something silly and easy to fix.
I have an advanced datagrid that hold records from a database. I've declared a databinding as follows
So every time the user selects and item in the datagrid it populates the customDatatype object. this is defined as follows
This works with no issues. The problem is that as soon as I change the dataprovider for the advanced datagrid I seem to lose this binding. so an attempt to pull any data from the customDatatype object causes an error
'TypeError: Error #1009: Cannot access a property or method of a null object reference'
Is there anyway to reinitialize the binding or am I missing something?
Sorry just noticed the code is missing from the bove question.
The code is ,
<fx:Binding source="adg1.selectedItem as CustomDatatype" destination="customDatatype"/>
I've tried the executeBindings() method for the datagrid, but this has not worked, any help please?