Back to Devexpress

ASPxClientHint.Register(targetSelector, options) Method

aspnet-js-aspxclienthint-dot-register-dot-static-x28-targetselector-options-x29.md

latest2.1 KB
Original Source

ASPxClientHint.Register(targetSelector, options) Method

Registers a hint’s functionality with the specified settings.

Declaration

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

Parameters

NameTypeDescription
targetSelectorstring

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

TypeDescription
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.

aspx
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></td><td><span>' + value + '</span></td></tr></table>';
            ASPxClientHint.UpdatePosition(e.hintElement);
        });
        return 'loading...';
    },
    position: 'left',
    triggerAction: 'click'
});

See Also

ASPxHint - Hint for Text EllipsisOnline Demo:

How to: Specify Hint Position

ASPxClientHint Class

ASPxClientHint Members