1 Reply Latest reply on Jun 17, 2011 5:11 PM by Flex harUI

    Restrict Input to a Datagrid cell

    idk404

      I am trying to restrict my datagrid cell input so that it only accepts numbers. I create my Datagrid columns in actionscript instead of mxml.

      I am trying to assign a textInput to ItemEditor property of datagridcolumn.

       

      var newColumn : DataGridColumn = new DataGridColumn(s); // si s the header string

      newColumn.editable = true;

       

      var ti : TextInput = new TextInput();

      ti.restrict = "0-9";

       

      newColumn.itemRenderer = ti as IFactory;

       

      However, this does not work. Anyone have better suggestions on restricting datagrid cell input ??

       

       

      Thanks