Fusion8 Design Relational ListControl Class Library

RelationalDropDownList.RegisterClientScript Method 

[This is preliminary documentation and subject to change.]

Registers all the client side script for the RelationalDropDownList.

[Visual Basic]
Overridable Protected Sub RegisterClientScript()
[C#]
protected virtual void RegisterClientScript();

Remarks

This method registers the client script to hold the control's values in an array, to manage client side updating, and to initialize the control's values.

Control Initialization Script

The initialization script is only registered if the control's parent is not an IRelationalListControl or the control's parent does not have a parent itself. If one of these conditions exist, the control's parent control is the top level control and the initialization script is registered for the parent control.

The initialization script causes an onChange event during page load on the top level control. The event updates the top level control and cascades an update to all child controls. The child controls then load their values based on the selection in their parent.

Client Update Management Script

The client update management script controls the client side updating of the control and is emitted on each page by default. The developer may add a configuration section to the Web.config file with the location of an external script file. If the configuration section is present, the control will only emit a link to the external script file.

Example

The following example demonstrates how to set the client update management script path via the Web.config file.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="fusion8Design.webControls">
            <section 
                name="relationalListControls"
                type="System.Configuration.NameValueSectionHandler,
                    system, 
                    Version=1.0.3300.0, 
                    Culture=neutral, 
                    PublicKeyToken=b77a5c561934e089, 
                    Custom=null" />
        </sectionGroup>
    </configSections>

    <fusion8Design.webControls>
        <relationalListControls>
            <add key="externalScriptPath" value="/MyWebApp/scripts/RelationalListControls.js" /> 
        </relationalListControls>
    </fusion8Design.webControls>
    ...

See Also

RelationalDropDownList Class | Fusion8Design.WebControls.UI Namespace