PDA

View Full Version : Still can't bind a grid to a dataset with code !


mojito
01-30-2007, 12:52 PM
I dont want to place the components on the first frame for cleanliness (is this the problem) I see that I need to do this to make bindings with the inspector.

I am creating a clean interface and want to be able to position my grid and see it later on not on the first frame.

here is my binding code

gridBind.component = myDG;
gridBind.property = "dataProvider";

sourceBind.component = myDS;
sourceBind.property = "dataProvider";

var DGtoDS:Binding = new Binding(gridBind,sourceBind);


bttn.onPress = function() {
var bindingResults:Array = DGtoDS.execute(false);
}
// on press I make the binding happen and the sharing of the data

but I cannot see this has happened



I would really prefer the control to bind like this if possible, this has been bugging me a while now any takers...?