Skip to main content

MVCxClientTokenBox.Cast(obj) Method

Converts the specified object to the MVCxClientTokenBox type.

Declaration

static Cast(
    obj: any
): MVCxClientTokenBox

Parameters

Name Type Description
obj any

The client object to be type cast.

Returns

Type Description
MVCxClientTokenBox

The converted client object specified by the obj parameter.

Remarks

Call the static Cast method to cast the specified client object to the MVCxClientTokenBox type. As a result, the type specific IntelliSense information can be displayed for the object.

Example

Convert the event source object passed to a client event’s handler.

<ClientSideEvents Init="function(s, e) { 
     var clientObject = MVCxClientTokenBox.Cast(s);
}" /> 

Convert a client object accessed by its TokenBoxSettings.Name property value.

@Html.DevExpress().TokenBox(
     settings => {
          settings.Name = "MVCxClientTokenBox1";
...
var clientObject = MVCxClientTokenBox.Cast('MVCxClientTokenBox1'); 
See Also