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
  [Expand]DevExpress.Web.ASPxSpreadsheet.Scripts
  [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
  [Collapse]DevExpress.XtraCharts.Web.Scripts
   [Expand]ASPxClientAnnotation Class
   [Expand]ASPxClientAverageTrueRange Class
   [Expand]ASPxClientAxis Class
   [Expand]ASPxClientAxis2D Class
   [Expand]ASPxClientAxis3D Class
   [Expand]ASPxClientAxisBase Class
   [Expand]ASPxClientAxisLabelItem Class
   [Expand]ASPxClientAxisRange Class
   [Expand]ASPxClientAxisTitle Class
   [Expand]ASPxClientAxisValue Class
   [Expand]ASPxClientBollingerBands Class
   [Expand]ASPxClientChaikinsVolatility Class
   [Expand]ASPxClientChartPrintOptions Class
   [Expand]ASPxClientChartTitle Class
   [Expand]ASPxClientCommodityChannelIndex Class
   [Expand]ASPxClientConstantLine Class
   [Expand]ASPxClientControlCoordinates Class
   [Expand]ASPxClientCrosshairAxisLabelElement Class
   [Expand]ASPxClientCrosshairDrawInfo Class
   [Expand]ASPxClientCrosshairDrawInfoList Class
   [Expand]ASPxClientCrosshairElement Class
   [Expand]ASPxClientCrosshairElementGroup Class
   [Expand]ASPxClientCrosshairFreePosition Class
   [Expand]ASPxClientCrosshairGroupHeaderElement Class
   [Expand]ASPxClientCrosshairLineElement Class
   [Expand]ASPxClientCrosshairMousePosition Class
   [Expand]ASPxClientCrosshairOptions Class
   [Expand]ASPxClientCrosshairPosition Class
   [Expand]ASPxClientCrosshairSeriesLabelElement Class
   [Expand]ASPxClientCrosshairValueItem Class
   [Expand]ASPxClientCustomLegendItem Class
   [Expand]ASPxClientDataSourceBasedErrorBars Class
   [Expand]ASPxClientDetrendedPriceOscillator Class
   [Expand]ASPxClientDiagramCoordinates Class
   [Expand]ASPxClientExponentialMovingAverage Class
   [Expand]ASPxClientFibonacciIndicator Class
   [Expand]ASPxClientFinancialIndicator Class
   [Expand]ASPxClientFinancialIndicatorPoint Class
   [Expand]ASPxClientFixedValueErrorBars Class
   [Expand]ASPxClientHitObject Class
   [Expand]ASPxClientImageAnnotation Class
   [Expand]ASPxClientIndicator Class
   [Expand]ASPxClientLegend Class
   [Expand]ASPxClientLineStyle Class
   [Expand]ASPxClientMassIndex Class
   [Expand]ASPxClientMedianPrice Class
   [Expand]ASPxClientMovingAverage Class
   [Expand]ASPxClientMovingAverageConvergenceDivergence Class
   [Expand]ASPxClientPercentageErrorBars Class
   [Expand]ASPxClientRadarAxis Class
   [Expand]ASPxClientRadarDiagram Class
   [Expand]ASPxClientRateOfChange Class
   [Expand]ASPxClientRegressionLine Class
   [Expand]ASPxClientRelativeStrengthIndex Class
   [Expand]ASPxClientSeries Class
   [Expand]ASPxClientSeriesLabel Class
   [Expand]ASPxClientSeriesPoint Class
   [Expand]ASPxClientSeriesTitle Class
   [Expand]ASPxClientSimpleDiagram Class
   [Expand]ASPxClientSimpleMovingAverage Class
   [Expand]ASPxClientSingleLevelIndicator Class
   [Expand]ASPxClientStandardDeviation Class
   [Expand]ASPxClientStandardDeviationErrorBars Class
   [Expand]ASPxClientStandardErrorBars Class
   [Expand]ASPxClientStrip Class
   [Expand]ASPxClientSwiftPlotDiagram Class
   [Expand]ASPxClientSwiftPlotDiagramAxis Class
   [Expand]ASPxClientTextAnnotation Class
   [Expand]ASPxClientTitleBase Class
   [Expand]ASPxClientToolTipController Class
   [Expand]ASPxClientToolTipFreePosition Class
   [Expand]ASPxClientToolTipMousePosition Class
   [Expand]ASPxClientToolTipPosition Class
   [Expand]ASPxClientToolTipRelativePosition Class
   [Expand]ASPxClientTrendLine Class
   [Expand]ASPxClientTriangularMovingAverage Class
   [Expand]ASPxClientTripleExponentialMovingAverageTema Class
   [Expand]ASPxClientTripleExponentialMovingAverageTrix Class
   [Expand]ASPxClientTypicalPrice Class
   [Expand]ASPxClientWebChart Class
   [Collapse]ASPxClientWebChartControl Class
     ASPxClientWebChartControl Members
     ASPxClientWebChartControl Constructor
    [Expand]ASPxClientWebChartControl Events
    [Collapse]ASPxClientWebChartControl Methods
     [Collapse]Cast Method
       Cast(Object) Method
      GetChart Method
      GetMainDOMElement Method
      GetPrintOptions Method
      HitTest Method
      LoadFromObjectModel Method
     [Expand]PerformCallback Method
      Print Method
     [Expand]SaveToDisk Method
      SaveToWindow Method
      SetCursor Method
   [Expand]ASPxClientWebChartControlCustomDrawCrosshairEventArgs Class
    ASPxClientWebChartControlCustomDrawCrosshairEventHandler Delegate
   [Expand]ASPxClientWebChartControlHotTrackEventArgs Class
    ASPxClientWebChartControlHotTrackEventHandler Delegate
   [Expand]ASPxClientWebChartElement Class
   [Expand]ASPxClientWebChartElementNamed Class
   [Expand]ASPxClientWebChartEmptyElement Class
   [Expand]ASPxClientWebChartHitInfo Class
   [Expand]ASPxClientWebChartRequiredElement Class
   [Expand]ASPxClientWeightedClose Class
   [Expand]ASPxClientWeightedMovingAverage Class
   [Expand]ASPxClientWilliamsR Class
   [Expand]ASPxClientXYDiagram Class
   [Expand]ASPxClientXYDiagram2D Class
   [Expand]ASPxClientXYDiagram3D Class
   [Expand]ASPxClientXYDiagramBase Class
   [Expand]ASPxClientXYDiagramPane Class
   [Expand]ASPxSeparatePaneIndicator Class
[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

ASPxClientWebChartControl.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.XtraCharts.Web.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: ASPxClientWebChartControl
An object of the ASPxClientWebChartControl 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 ASPxClientWebChartControl type. As a result, the object's type is now known and ASPxClientWebChartControl 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 = ASPxClientWebChartControl.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 'ASPxClientWebChartControl1', the object can be type cast in the following manner:

        ...
        var clientObject = ASPxClientWebChartControl.Cast('ASPxClientWebChartControl1');
    

Expanded See Also

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