Skip to Content
0
Former Member
Sep 24, 2009 at 01:50 PM

changing dataProvider of custom dataGrid to XCelsius Cells

25 Views

Hi everybody,

I have quite a simple question, however, I do not really get a solution for that on my own.

Actually, all I want to do is extend a usual Datagrid to display my data from XCelsius using the standard propertysheet. The way I tried to do this was to make the dataProvider inspectable.

My actionscript file:

package myPackage
{
	import mx.controls.DataGrid;
	[CxInspectableList("dataProvider")]
	public class MyDG extends DataGrid
	{
		public function MyDG()
		{
			super();
		}
		
		[Inspectable(defaultValue="undefined", type="Array2D")]
        [ArrayElementType("Number")]
		override public function get dataProvider():Object
		{
			return super.dataProvider;
		}
		override public function set dataProvider(value:Object):void
		{
			super.dataProvider(value);
		}
	}
}

When I pack this into an .xlx, I can view it and preview it as long as I do not try to change the dataProvider. When changing it, the preview window stops to load at some point.

Thanks for your help in advance!