Ronald Bouras
Posts: 32
Joined: 2006-05-20
|
hi everybody,
what would be the appropriate way to address some custom properties i declared as public in an adx form from outside, i.e. the addin module?
the addinmodule only knows its object ADXCustomerForm, declared as :
private ADXOlFormsCollectionItem adxCustomerForm;
so if, for example my form is declared like:
public class offCustomer : AddinExpress.OL.ADXOlForm
and has a public method, for example:
public void RelinkContactToDB() {...}
how would I call this method from the Addin module?
the following way fails:
((offCustomer)adxCustomerForm).RelinkContactToDB();
because the compiler would not cast ADXOlFormsCollectionItem to offCustomer
any help appreciated.
regards
ron |
|
logikonline
Posts: 35
Joined: 2006-04-14
|
I create a public funtion in the Addin - then fire it on creation of the form to reset any values that need to be reached for processing.
in the form.. during one of the events (check for multiple firing - I usually just use the load event - then add this
CType(Me.AddinModule, AddinModule).<any function>
regards,
Dave |
|
Fedor Shihantsov
Guest
|
Ronald,
Casting the ADXOlFormsCollectionItem type to ADXOlFormsCollectionItem is incorrect.
You can use the ADXOLForm.ADXBeforeFormShow event for initializing code.
Also you can use the ADXOLFormsManager.CurrentForm property and cast it to the offCustomer type.
offCustomer myForm = adxolFormsManager.CurrentForm as offCustomer;
if (myForm <> nil)
{
myForm.RelinkContactToDB();
}
|
|
David Ing
Posts: 56
Joined: 2006-06-27
|
Fedor,
The ADXOLForm.ADXBeforeFormShow event seemt to fire for each form in the collection, and this reruns any init code quite a few times.
Is there another way to do one off init or change the behavior of ADXOLForm.ADXBeforeFormShow?
lokionline - I find that any subpane ADX form Load events don't get fired, but that could just be me.
Thanks for any help. |
|
Fedor Shihantsov
Guest
|
David,
The ADXOLForm.ADXBeforeFormShow event seemt to fire for each form in the collection, and this reruns any init code quite a few times.
I've checked the ADXBeforeFormShow event. If there are several ADXOlForms, it raises only for the ADXOlForm to be shown. And it raises only once. Please, let me know if I'm wrong.
I find that any subpane ADX form Load events don't get fired, but that could just be me.
We will fixed this issue in the next release to be published at July 25 or 26.
|
|