TCallbackOptions

API Manual

TCallbackOptions allows a common set of callback client-side options to be attached to one or more active controls. This can be useful if a lot of active controls on the same page are sharing the same callback client-side options. Instead of specifying the same set of options again and again inside each control, these can be written once inside a TCallbackOptions; this TCallbackOptions can be then attached to each control using the ActiveControl.CallbackOptions property. For a full list of assignable properties, please check the TCallbackClientSide documentation.

The typical scenario of use for a TCallbackOptions is a page where a lot of active controls needs to pause the user interaction with a "Please wait" style message until callback completion. First create a single TCallbackOptions control, assign it an ID and the the needed properties:

<com:TCallbackOptions
	ID="MyOptions"
	ClientSide.OnLoading="... kindly inform the user that he should wait ..."
	ClientSide.OnComplete="... callback completed, ready to serve the user again ..."
/>

Then, share this set of options to one or more active controls; each control will follow them:

<com:TActiveButton
	Text="simple button"
	OnCallback="..."
	ActiveControl.CallbackOptions="MyOptions"
	...
/>

<com:TActiveCheckBox
	Text="simple checkbox"
	OnCallback="..."
	ActiveControl.CallbackOptions="MyOptions"
	...
/>