1 Reply Latest reply on Mar 29, 2010 12:50 PM by matn1

    Flashbuilder 4 Upgrade from Flex 3 DataGrid sortCompareFunction

    matn1

      Any ideas why I might get this error from a sortCompareFunction property while it was working in Flex 3 and how to resolve

       

      1120:Access of undefined property caselessSortForField("username")

       

      In same file I have the following function

       

         public function caselessSortForField(field:String):Function
                  {
                      return function(obj1:Object, obj2:Object):int
                      {
                          return ObjectUtil.stringCompare(obj1[field], obj2[field], true);
                      }
                  }

       

      In my Datagrid I call

        <mx:DataGridColumn headerText="User Name" dataField="username" sortCompareFunction="caselessSortForField('username')"/>  

       

      -- Thanks, Mike