Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              
    <div class="dx-viewport demo-container">
        <div id="gridContainer"></div>
        <div id="employeeInfo">
            <img class="employeePhoto" />
            <p class="employeeNotes"></p>
        </div>
        
    </div>

            
          
!

CSS

            
              #employeeInfo .employeePhoto {
    height: 100px;
    float: left;
    padding: 20px;
}

#employeeInfo .employeeNotes {
    padding-top: 20px;
    text-align: justify;
}

.dark #employeeInfo .employeeNotes {
    color: rgb(181, 181, 181);
}


.last-column {
  padding: 0px!important;
  border-left: 0px!important;
  border-right: 0px!important;
}
            
          
!

JS

            
              $(function(){
    $("#gridContainer").dxDataGrid({
        dataSource: employees,
        keyExpr: "ID",
        selection: {
            mode: "single"
        },
        editing: {
            mode: "popup",
            allowUpdating: true
        }, 
        width: '800',
        hoverStateEnabled: true,
        showBorders: true,
        columns: [{
            type: "buttons",
            width: 110,
            buttons: ["edit"]
        }, {
            dataField: "Prefix",
            caption: "Title",
            width: "auto"
        }, {
            dataField: "Position",
            width: "auto"
        }, {
            dataField: "Position",
            width: "auto"
        }, {
            dataField: "Position",
            width: "auto"
        }, {
            dataField: "BirthDate",
            dataType: "date",
            width: "auto"
        }, {
            dataField: "HireDate",
            dataType: "date",
            width: "auto"
        }, {
            width: "auto",
            cssClass: 'last-column', // this class in the CSS block
           // removes paddings and borders of the last column
            cellTemplate: function(container) {
              // this empty template removes the 
              // spaces from data cells
            }
        }]
      
    });
});

var employees = [{
    "ID": 1,
    "FirstName": "John",
    "LastName": "Heart",
    "Prefix": "Mr.",
    "Position": "CEO",
    "Picture": "https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/01.png",
    "BirthDate": "1964/03/16",
    "HireDate": "1995/01/15",
    "Notes": "John has been in the Audio/Video industry since 1990. He has led DevAv as its CEO since 2003.\r\n\r\nWhen not working hard as the CEO, John loves to golf and bowl. He once bowled a perfect game of 300.",
    "Address": "351 S Hill St."
}, {
    "ID": 20,
    "FirstName": "Olivia",
    "LastName": "Peyton",
    "Prefix": "Mrs.",
    "Position": "Sales Assistant",
    "Picture": "https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/09.png",
    "BirthDate": "1981/06/03",
    "HireDate": "2012/05/14",
    "Notes": "Olivia loves to sell. She has been selling DevAV products since 2012. \r\n\r\nOlivia was homecoming queen in high school. She is expecting her first child in 6 months. Good Luck Olivia.",
    "Address": "807 W Paseo Del Mar"
}, {
    "ID": 4,
    "FirstName": "Robert",
    "LastName": "Reagan",
    "Prefix": "Mr.",
    "Position": "CMO",
    "Picture": "https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/03.png",
    "BirthDate": "1974/09/07",
    "HireDate": "2002/11/08",
    "Notes": "Robert was recently voted the CMO of the year by CMO Magazine. He is a proud member of the DevAV Management Team.\r\n\r\nRobert is a championship BBQ chef, so when you get the chance ask him for his secret recipe.",
    "Address": "4 Westmoreland Pl."
}, {
    "ID": 5,
    "FirstName": "Greta",
    "LastName": "Sims",
    "Prefix": "Ms.",
    "Position": "HR Manager",
    "Picture": "https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/04.png",
    "BirthDate": "1977/11/22",
    "HireDate": "1998/04/23",
    "Notes": "Greta has been DevAV's HR Manager since 2003. She joined DevAV from Sonee Corp.\r\n\r\nGreta is currently training for the NYC marathon. Her best marathon time is 4 hours. Go Greta.",
    "Address": "1700 S Grandview Dr."
}, {
    "ID": 6,
    "FirstName": "Brett",
    "LastName": "Wade",
    "Prefix": "Mr.",
    "Position": "IT Manager",
    "Picture": "https://js.devexpress.com/Demos/WidgetsGallery/JSDemos/images/employees/05.png",
    "BirthDate": "1968/12/01",
    "HireDate": "2009/03/06",
    "Notes": "Brett came to DevAv from Microsoft and has led our IT department since 2012.\r\n\r\nWhen he is not working hard for DevAV, he coaches Little League (he was a high school pitcher).",
    "Address": "1120 Old Mill Rd."
}];
            
          
!
999px

Console