I have a flex spark list that is populated by a dynamically generated ArrayCollection (and is used in a recyclable component). If the Array Collection is less than 9 items, a checkbox item renderer is applied. If the ArrayCollection is greater than 8 items, I want to revert back to the default sparkList item Renderer. How do I remove the itemRenderer from the spark list?
if ((ac.length>0)&&(ac.length <=8))
{
//implement a renderer in the control for check boxes - this works!
this._s_g_ListBoxLong._list.itemRenderer = new ClassFactory(morris.renderers.Renderer_checkBoxes);
}
else if (ac.length >=9)
{
//apply the default item renderer for a spark list or remove the itemRenderer pointer
//????? HOW DO I DO THIS?
}
else
{
//do nothing
}
this._s_g_ListBoxLong._list.dataProvider = ac;