Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Collapse]API Reference
  [Expand]DevExpress.Data.Linq
  [Expand]DevExpress.Web
  [Expand]DevExpress.Web.ASPxGauges
  [Expand]DevExpress.Web.ASPxGauges.Base
  [Expand]DevExpress.Web.ASPxGauges.Scripts
  [Expand]DevExpress.Web.ASPxHtmlEditor
  [Expand]DevExpress.Web.ASPxHtmlEditor.Localization
  [Expand]DevExpress.Web.ASPxHtmlEditor.Scripts
  [Expand]DevExpress.Web.ASPxPivotGrid
  [Expand]DevExpress.Web.ASPxPivotGrid.Data
  [Expand]DevExpress.Web.ASPxPivotGrid.HtmlControls
  [Expand]DevExpress.Web.ASPxPivotGrid.Scripts
  [Expand]DevExpress.Web.ASPxRichEdit
  [Expand]DevExpress.Web.ASPxRichEdit.Localization
  [Expand]DevExpress.Web.ASPxRichEdit.Scripts
  [Expand]DevExpress.Web.ASPxScheduler
  [Expand]DevExpress.Web.ASPxScheduler.Commands.Dialogs
  [Expand]DevExpress.Web.ASPxScheduler.Controls
  [Expand]DevExpress.Web.ASPxScheduler.Dialogs
  [Expand]DevExpress.Web.ASPxScheduler.Drawing
  [Expand]DevExpress.Web.ASPxScheduler.Localization
  [Expand]DevExpress.Web.ASPxScheduler.Reporting
  [Expand]DevExpress.Web.ASPxScheduler.Scripts
  [Expand]DevExpress.Web.ASPxSpellChecker
  [Expand]DevExpress.Web.ASPxSpellChecker.Localization
  [Expand]DevExpress.Web.ASPxSpellChecker.Scripts
  [Expand]DevExpress.Web.ASPxSpreadsheet
  [Expand]DevExpress.Web.ASPxSpreadsheet.Localization
  [Collapse]DevExpress.Web.ASPxSpreadsheet.Scripts
   [Collapse]ASPxClientSpreadsheet Class
     ASPxClientSpreadsheet Members
     ASPxClientSpreadsheet Constructor
    [Expand]ASPxClientSpreadsheet Events
    [Collapse]ASPxClientSpreadsheet Methods
     [Collapse]Cast Method
       Cast(Object) Method
      Focus Method
      GetActiveCellValue Method
      GetCellComment Method
      GetCellValue Method
      GetRibbon Method
      GetSelection Method
      HasUnsavedChanges Method
     [Expand]PerformCallback Method
      PerformDocumentCallback Method
      ReconnectToExternalRibbon Method
      SetFullscreenMode Method
   [Expand]ASPxClientSpreadsheetCustomCommandExecutedEventArgs Class
    ASPxClientSpreadsheetCustomCommandExecutedEventHandler Delegate
   [Expand]ASPxClientSpreadsheetDocumentChangedEventArgs Class
    ASPxClientSpreadsheetDocumentChangedEventHandler Delegate
   [Expand]ASPxClientSpreadsheetHyperlinkClickEventArgs Class
    ASPxClientSpreadsheetHyperlinkClickEventHandler Delegate
   [Expand]ASPxClientSpreadsheetPopupMenuItem Class
   [Expand]ASPxClientSpreadsheetPopupMenuItemCollection Class
   [Expand]ASPxClientSpreadsheetPopupMenuShowingEventArgs Class
    ASPxClientSpreadsheetPopupMenuShowingEventHandler Delegate
    ASPxClientSpreadsheetPopupMenuType Enumeration
   [Expand]ASPxClientSpreadsheetSelection Class
   [Expand]ASPxClientSpreadsheetSelectionChangedEventArgs Class
    ASPxClientSpreadsheetSelectionChangedEventHandler Delegate
   [Expand]ASPxClientSpreadsheetSynchronizationEventArgs Class
    ASPxClientSpreadsheetSynchronizationEventHandler Delegate
  [Expand]DevExpress.Web.ASPxTreeList
  [Expand]DevExpress.Web.ASPxTreeList.Internal
  [Expand]DevExpress.Web.ASPxTreeList.Localization
  [Expand]DevExpress.Web.ASPxTreeList.Scripts
  [Expand]DevExpress.Web.Captcha
  [Expand]DevExpress.Web.Data
  [Expand]DevExpress.Web.Internal
  [Expand]DevExpress.Web.Localization
  [Expand]DevExpress.Web.Mvc
  [Expand]DevExpress.Web.Mvc.BinderSettings
  [Expand]DevExpress.Web.Mvc.Controllers
  [Expand]DevExpress.Web.MVC.Scripts
  [Expand]DevExpress.Web.Mvc.UI
  [Expand]DevExpress.Web.Office
  [Expand]DevExpress.Web.Office.Internal
  [Expand]DevExpress.Web.Rendering
  [Expand]DevExpress.Web.Scripts
  [Expand]DevExpress.XtraCharts.Web
  [Expand]DevExpress.XtraCharts.Web.Designer
  [Expand]DevExpress.XtraCharts.Web.Scripts
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

ASPxClientSpreadsheet.Cast(Object) Method

Converts the specified object to the current object's type. This method is effective when you utilize the Client API IntelliSense feature provided by DevExpress.

Namespace:DevExpress.Web.ASPxSpreadsheet.Scripts
Assembly:JavaScript

Expanded Syntax

Parameters

obj
Type: Object
The client object to be type cast. Represents an instance of a DevExpress web control's client object.

Return value

Type: ASPxClientSpreadsheet
An object of the ASPxClientSpreadsheet type. Represents the converted client object specified by the obj parameter.

Expanded Remarks

The Cast method is implemented as a part of the JavaScript IntelliSense support for DevExpress ASP.NET controls and MVC extensions. So, using the Cast method is sensible when you intend to use IntelliSense during writing JavaScript code at design time with the help of the DevExpress client API.

A call to the Cast method (which is a static method) casts the specified client object to the ASPxClientSpreadsheet type. As a result, the object's type is now known and ASPxClientSpreadsheet type specific IntelliSense information can be displayed for this client object, facilitating your coding.

The examples of this method application are as follows.

  • Converting the event source object passed to a client event's handler:

        ...
        <ClientSideEvents Init="function(s, e) { 
            var clientObject = ASPxClientSpreadsheet.Cast(s);
        }" />
    
  • Converting a client object accessed by using the value of the ClientInstanceName (or ID) property. For instance, if a web control's ClientInstanceName property is set to 'ASPxClientSpreadsheet1', the object can be type cast in the following manner:

        ...
        var clientObject = ASPxClientSpreadsheet.Cast('ASPxClientSpreadsheet1');
    

Expanded See Also

How would you rate this topic?​​​​​​​