• + D
  • Light
  • Dark
  • System
logoData Den
  • Overview
    • Installation
    • License
    • Support
    • Options
  • Layout
    • Theme
    • Custom CSS
    • CSS Variables
  • Features
    • Column pinning
    • Data Loader
    • Drag And Drop
    • Filtering
      • Header filters
      • Quick filter
    • Pagination
    • Resizing
    • Sorting
    • Editing
  • Api
    • Data Loader
    • Filter renderer

Column Pinning

Data Grid Column Pinning

Free column Pinning allows you to pin a column to the left or right side of the grid. It is possible to pin multiple columns at once.



Basic example

Use pinned: 'left' to pin column to the left side of the table.

  • HTML
  • javascript
        
            
            <div id="grid"></div>
            
        
    
        
            
                import { DataDen } from "data-den-core";

                const rows = [
                  { car: 'Honda', model: 'Civic', year: '01/05/2013', price: 28000 },
                  { car: 'Mitsubishi', model: 'Lancer', year: '01/05/2013', price: 56000 },
                  { car: 'Porsche', model: 'Boxster', year: '09/02/2020', price: 31000 },
                  { car: 'Toyota', model: 'Celica', year: '16/12/2010', price: 18000 },
                  { car: 'Kia', model: 'Sportage', year: '14/09/2006', price: 28000 },
                  { car: 'Ford', model: 'Focus', year: '04/07/2014', price: 24000 },
                  { car: 'Ford', model: 'Focus', year: '16/12/2010', price: 24000 },
                  { car: 'Porsche', model: 'Boxster', year: '24/01/2015', price: 31000 },
                  { car: 'Mitsubishi', model: 'Lancer', year: '14/09/2006', price: 18000 },
                  { car: 'Kia', model: 'Sportage', year: '01/05/2013', price: 24000 },
                ];

                const options = {
                  columns: [
                    {
                      field: "car",
                      headerName: "Car",
                      pinned: 'left'
                    },
                    {
                      field: "model",
                      headerName: "Model",
                    },
                    {
                      field: "year",
                      headerName: "Year",
                    },
                    {
                      field: "price",
                      headerName: "Price",
                    },
                  ],
                  rows: rows,
                };

                const gridEl = document.getElementById('grid');
                const dataDen = new DataDen(gridEl, options);
              
        
    

Empower anyone in your team to instantly get rid of their tasks, with no technical knowledge, using AI

  • Basic example
Get useful tips & free resources directly to your inbox along with exclusive subscriber-only content.
Join our mailing list now
© 2024 Copyright: MDBootstrap.com

Access restricted

To view this section you must have an active PRO account

Log in to your account or purchase an Data Den subscription if you don't have one.

Buy Data Den PRO