It seems that nether of the above controls can be instantiated on the client side, since simply their building blocks (EditPart and ButtonPart) will not be created -- there is no code for that in the framework.

This seems to be a huge omission to me if I'm correct. I'm working on an intelligent form editor with validation and everything for a live project and just bumped into this. :(

If I'm right, is there any quick workaround? Of course I can spend some hours trying to manually create the subcontrols, but would love to avoid that at this point...

Cheers,Péter

-1

Hi Folks,

It seems that nether of the above controls can be instantiated on the client side, since simply their building blocks (EditPart and ButtonPart) will not be created -- there is no code for that in the framework.

This seems to be a huge omission to me if I'm correct. I'm working on an intelligent form editor with validation and everything for a live project and just bumped into this. :(

If I'm right, is there any quick workaround? Of course I can spend some hours trying to manually create the subcontrols, but would love to avoid that at this point...

The short answer would be: run-time control creation currently is not supported. You can create simple controls like textlabels or containers at run-time, however with composite controls all inner parts are created at compile-time. It should be possible to create say combobox at run-time, however you will need to instantiate all these building blocks. One other issue with run-time control creation is that all image effects are also created at compile time. So basically, until we implement graphical effects using css3/html5, we will not be able to fully address this issue.

Having said that, there are ways of creating controls from template. Say if you have a control, you can copy its innerHTML or just clone whole DOM node to another control that was just created. We use this approach in EditableContinous by cloning detail band when creating new record. If you need to create control at server-side, you should also be able to clone it from template (InitFromTemplate method).

Hope it helps.

Regards,Dmitry

18397

Hi Peter,

The short answer would be: run-time control creation currently is not supported. You can create simple controls like textlabels or containers at run-time, however with composite controls all inner parts are created at compile-time. It should be possible to create say combobox at run-time, however you will need to instantiate all these building blocks. One other issue with run-time control creation is that all image effects are also created at compile time. So basically, until we implement graphical effects using css3/html5, we will not be able to fully address this issue.

Having said that, there are ways of creating controls from template. Say if you have a control, you can copy its innerHTML or just clone whole DOM node to another control that was just created. We use this approach in EditableContinous by cloning detail band when creating new record. If you need to create control at server-side, you should also be able to clone it from template (InitFromTemplate method).

If you create control at client side, you need to hookup it's DOMHandle array to DOM handles being created and assign Wrapper property for every HTML handle. This is done by Framework in SetupDOMHandle/AppendDOMHandle methods (the last one was added for band cloning, have a look to Band.Clone method for details).

TDOMHandleArray.Setup and TDOMHandleArray.AppendWrapperProperty is where all these actions are happening.

Hope it helps.

Regards,Dmitry

18438

Hi Peter,

If you create control at client side, you need to hookup it's DOMHandle array to DOM handles being created and assign Wrapper property for every HTML handle. This is done by Framework in SetupDOMHandle/AppendDOMHandle methods (the last one was added for band cloning, have a look to Band.Clone method for details).

TDOMHandleArray.Setup and TDOMHandleArray.AppendWrapperProperty is where all these actions are happening.