I am using an itemRenderer for a column of datagird (to display the data in form a hyperlink in a certain fashion) inside action script.
Everything works fine until I Sort any column of datagrid! When I do sort and I click the item inside this column it passes the wrong data to the function onCustomLink. I guess it is passing the old data based on original index of itemRenderer. Somehow itemRenderer class (CustomLinkRenderer) is not refreshing its data!
I tried putting invalidateDisplayList, ValidateNow() on headerRelease of the datagrid but no help! I even tried refreshing the dataprovider on headerRelease() but no help...
Could someone point what I should do to refresh the itemRenderer instances created for this datagrid on headerRelease event?
private var _col1:DataGridColumn;
var rendr1:ClassFactory = new ClassFactory(CustomLinkRenderer);
_col1.dataField = 'emp_name';
rendr1.properties = {SelCustomLinkName: 'emp_name'};
_col1.itemRenderer = rendr1;
this.addEventListener(CustomLinkRendererEvent.CUSTOM_LINK_RENDERER_EVENT,onCustomLink);
Thanks...