Using trial lib

Parent Previous Next

Usually, when you request a trial, we can optionally send you a library with babel core embedded in it. This allows you to play around with the grid with minimal setup. Meaning, you dont need webpack, babel, npm, and the whole nine yards mentioned in the preceding topic.


Here is the markup needed to run the grid:


<!DOCTYPE html>

<!--PLEASE ENSURE YOU READ THE ACCOMPANYING README.TXT FOR DETAILS-->

<html lang="en">

<head>

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

 <title>React DataGrid Example</title>

</head>

<body>

 <div id="app"></div>

 <script src="../../lib/reactdatagrid.js"></script>

 <script src="../../data.js"></script>

 <script type="text/babel">

     const  { ReactDataGrid, ReactDataGridColumn} = flexiciousNmsp;

     const grid = <ReactDataGrid  width={"100%"} editable dataProvider={companylist}>

       <ReactDataGridColumn dataField="label" />

       <ReactDataGridColumn dataField="state" />

       <ReactDataGridColumn dataField="rank" sortNumeric />

     </ReactDataGrid>;



     class Example extends React.Component {

       render() {

         return grid;

       }

     }


     ReactDOM.render(

       <Example/>,

       document.getElementById('app')

     );

   </script>

</body>


</html>


This generates a grid like this:


You can view the running example here :


http://reactdatagrid.com/runnable/examples/reactdatagrid/basic.html


Please note that since this included the babel core it will take a while to download, especially on slower connections.