aspnet-js-aspxclienthint-dot-register-dot-static-x28-targetselector-options-x29.md
Registers a hint’s functionality with the specified settings.
static Register(
targetSelector: string,
options: ASPxClientHintOptions | string | ASPxClientEvent<ASPxClientHintShowingEventHandler>
): ASPxClientHint
| 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.
|
| Type | Description |
|---|---|
| ASPxClientHint |
An ASPxClientHint that is the hint.
|
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></td><td><span>' + value + '</span></td></tr></table>';
ASPxClientHint.UpdatePosition(e.hintElement);
});
return 'loading...';
},
position: 'left',
triggerAction: 'click'
});
See Also