 		 */
 		private function getColumnMetadata(id:Object):Object
 		{
-			var meta:Object = metadata.getSessionState();
-			if (id is String && meta is Array)
-				return meta[columnIds.indexOf(id)];
-			else if (meta)
-				return meta[id];
+			try
+			{
+				if (id is Number)
+					id = columnIds[id];
+				var meta:Object = metadata.getSessionState();
+				if (meta is Array)
+				{
+					var array:Array = meta as Array;
+					for (var i:int = 0; i < array.length; i++)
+					{
+						var item:Object = array[i];
+						var itemId:* = item[METADATA_COLUMN_NAME] || item[METADATA_COLUMN_INDEX];
+						if (itemId === undefined)
+							itemId = columnIds[i];
+						if (itemId === id)
+							return item;
+					}
+					return null;
+				}
+				else if (meta)
+					return meta[id];
+			}
+			catch (e:Error)
+			{
+				reportError(e);
+			}
 			return null;
 		}
 		

	import weave.api.newLinkableChild;
	import weave.api.registerLinkableChild;
	import weave.api.reportError;
	import weave.core.CallbackCollection;
	import weave.core.LinkableFile;
	import weave.core.LinkableString;

		[Deprecated(replacement="getColumnById")] public function getColumnByName(name:String):IAttributeColumn { return getColumnById(name); }
	}
}
