Ok, disregard. Fix should be:

col.headerRenderer = new ClassFactory( HeaderRenderer );

As found here:

http://www.returnundefined.com/tags/as3/

-Scott

On 4/30/07, slangeberg <[EMAIL PROTECTED]> wrote:

Is there any reason why you can't set the headerRenderer in AS3? I'm
getting the following error (and this is just pointing at the 'default'
class - I want to extend it):

var col:DataGridColumn = new DataGridColumn();
col.headerRenderer = IFactory(DataGridItemRenderer);

-----------------------------------

TypeError: Error #1034: Type Coercion failed: cannot convert
dii.controls.dataGridClasses::HeaderRenderer$ to mx.core.IFactory .
    at com.dii.modelPro.view::GridFactory$/getColumns()
    at com.dii.modelPro.view::GridFactory$/getGrid()
    at com.dii.modelPro.view.projectDetails::DetailItem/::render()
    at MethodInfo-4641()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/::callLaterDispatcher2()
    at mx.core::UIComponent/::callLaterDispatcher()

-Scott

On 4/27/07, Manish Jethani <[EMAIL PROTECTED]> wrote:
>
>   On 4/28/07, slangeberg <[EMAIL PROTECTED] <slangeberg%40gmail.com>>
> wrote:
> > Any one come up with a strategy so that labels in the DataGrid column
> > headers (or elsewhere) can wrap, but not be broken in the midde of a
> word?
>
> That's the behaviour of the built-in TextField object and I don't
> think anything can be done about it. You could maybe write your own
> header renderer and write the word-wrapping logic yourself (and
> truncate words that are longer than the available width).
> >



--

: : ) Scott




--

: : ) Scott

Reply via email to