         var col:AdvancedDataGridColumn;
         var cw:Number;
 
-        if (columns.length == 0)
+        if (_columns.length == 0)
         {
             visibleColumns = [];
             return;

            {
                data = iterator.current;
                ch = 0;
                n = columns.length;
                for (j = 0; j < n; j++)
                {
                    c = columns[j];

                    if (!c.visible)
                        continue;


            if (itemEditorInstance is IIMESupport)
                IIMESupport(itemEditorInstance).imeMode =
                    (_columns[event.columnIndex].imeMode == null) ? _imeMode : _columns[event.columnIndex].imeMode;

            var fm:IFocusManager = focusManager;
            // trace("setting focus to item editor");
