Skip to main content
All docs

Access a DashboardControl Instance in React

The sample below shows how you can access properties and call methods of a DashboardControl in a React application.

Create a ref and use the ref attribute to attach it to the target component. You can then use the instance property to access the underlying DashboardControl and its members.

import { DashboardControl } from 'devexpress-dashboard-react';
import Button from 'devextreme-react/button';

const dashboardControlRef = React.createRef();

function reloadData() {

function App() {
  return (    
    <div style={{ position : 'absolute', top : '0px', left: '0px', right : '0px', bottom: '0px' }}>      
      <Button text="Reload data" onClick={reloadData} />
      <DashboardControl style={{ height: '90%' }} 
        ref={ dashboardControlRef }

export default App;