Skip to main content

ASPxClientHint.Register(targetSelector, options) Method

Registers a hint’s functionality with the specified settings.

Declaration

static Register(
    targetSelector: string,
    options: ASPxClientHintOptions | string | ASPxClientEvent<ASPxClientHintShowingEventHandler>
): ASPxClientHint

Parameters

Name Type Description
targetSelector string

A string value that is the CSS selector. Specifies to which UI elements the hint is displayed.

options string | ASPxClientHintOptions | ASPxClientEvent<ASPxClientHintShowingEventHandler>

An ASPxClientHintOptions object that is the hint’s options.

Returns

Type Description
ASPxClientHint

An ASPxClientHint that is the hint.

Remarks

The Register method is used to register a hint’s functionality with the specified settings: the hint’s target element, trigger action and content.

ASPxClientHint.Register('[data-visibleindex]', {
    onShowing: function(s, e) {
        var index = e.targetElement.dataset['visibleindex'];
        var key = Grid.GetRowKey(index);
        Grid.GetRowValues(index, 'Notes', function(value) {
            e.contentElement.innerHTML = '<table class="hintContent"><tr><td><img src="LoadContentOnDemand.aspx?photo=' +
              key + '" /></td><td><span>' + value + '</span></td></tr></table>';
            ASPxClientHint.UpdatePosition(e.hintElement);
        });
        return 'loading...';
    },
    position: 'left',
    triggerAction: 'click'
});
See Also