3 Replies Latest reply on Sep 2, 2011 4:27 AM by jfb00

    Assign datagrid label function

    jfb00 Level 3

      Hi All,

      How can I assign a datagrid label function using variable string?

       

      dataGridColumn.labelFunction = myLabelFunction;

      where myLabelFunction is a string parameter "myformatNumber" and myFormatNumber is function as:

       

      function myformatNumber(item:Object, dgColumn:Object):String

       

      I try the next lines but no luck:

      dataGridColumn.labelFunction = myLabelFunction as Function;

      AND

      dataGridColumn.labelFunction = "myFormatNumber" as Function;

       

      Any ideas?

      Thanks

       

      Johnny