views:

170

answers:

1

As a Delphi developer moving to .NET I'm expecting similar concept like TDataModule & TForm to be available. However, I could not find way to make a reference from a component on a Form to another component on another Form (or Component) class.

I understand technical difference underlying the issue. Delphi component architecture is based on component-streaming (resource serialization), but .NET form is actually a code generator. If it's not possible to do such thing; I wonder how typically, form UI designer put common component into the same place ? Does it always have to be implemented in code only ?

For a bit more specific to what I'm trying to accomplish; I'm using DevExpress XtraGrid for which multiple instance of grids can reference to common "ExternalRepository" How can the grids in separated forms reference to the same instance of ExternalRepository ? Setting this property via code is completely eliminate grid design-time capabilities.

Any trick here?

A: 

Question answered by DevExpress Forum

Sorry, but it seams like it is not possible. You will find some explaination about this in this support center issue:

Can the same PersistentRepository be linked to many GridControls in different forms in design time?

http://www.devexpress.com/Support/Center/p/DQ11884.aspx

Short answer: only possible at runtime.

Regards, Marc Greiner [DX-Squad]

Sake