                 // this is an old recordset - use its columns
                 var n:int = cols.length;
                 var colName:Object;
-                for (var i:int = 0; i < n; i++)
-                {
-                    colName = cols[i];
-                    if (colName is QName)
-                        colName = QName(colName).localName;
-                    col = new DataGridColumn();
-                    col.dataField = String(colName);
-                    newCols.push(col);
-                }
+				if (n == 0) {
+					col = new DataGridColumn();
+					newCols.push(col);
+				}
+				else {
+	                for (var i:int = 0; i < n; i++)
+	                {
+	                    colName = cols[i];
+	                    if (colName is QName)
+	                        colName = QName(colName).localName;
+	                    col = new DataGridColumn();
+	                    col.dataField = String(colName);
+	                    newCols.push(col);
+	                }
+				}
             }
                                 
             columns = newCols;

                /** Old code assumed that the property would be a simply name that could be dereferenced
                  * through array notation. Using a method call here provides, minimally, an override
                  * point where developers could extend this functionality in their own datagrid subclass **/
                if (property != null && getCurrentDataValue( data, property ) !== newData)
                {
                    bChanged = setNewValue( data, property, newData, event.columnIndex );
                }
                if (bChanged && !(data is IPropertyChangeNotifier || data is XML))
                {

    /**
     *  @private
     */ 
    protected function getCurrentDataValue(data:Object, property:String):String
    {
		if (property == null)
			return String(data);
			
        if (!isComplexColumn(property))
            return data[property];
        
        var complexFieldNameComponents:Array = property.split(".");
        var obj:Object = deriveComplexFieldReference(data, complexFieldNameComponents);

        return String(obj);
    }

    //Passing all of these parameters as it basically allows everything you would need to subclass for all sorts of fun implementations
    /**
     *  @private
     */ 
    protected function setNewValue(data:Object, property:String, value:Object, columnIndex:int):Boolean 
    {
        if (!isComplexColumn(property))
        {
			if (property != null)
            	data[property] = value;
        } 
        else 
        {
            var complexFieldNameComponents:Array = property.split(".");
            var lastProp:String = complexFieldNameComponents.pop();
            var parent:Object = deriveComplexFieldReference(data, complexFieldNameComponents);
            parent[lastProp] = value;
        }
        
        //The value they typed in is always converted to a string, but is the value actually a string in the dataprovider?
