rerender() {
    if (this.columns.length === 0 && this.data.length === 0) {
      return;
    }

    const template = document.createElement('template');
    const dir = this.container?.getAttribute('dir');
    const html = this.template();

    // Render and append styles
    this.shadowRoot.innerHTML = '';
    this.hasStyles = false;
    this.appendStyles();
    this.setColumnWidths();
    template.innerHTML = html;
    this.shadowRoot.appendChild(template.content.cloneNode(true));
    this.container = this.shadowRoot.querySelector('.ids-data-grid');

    // Setup virtual scrolling
    if (IdsStringUtils.stringToBool(this.virtualScroll) && this.data.length > 0) {
      /** @type {object} */
      this.virtualScrollContainer = this.shadowRoot.querySelector('ids-virtual-scroll');
      this.virtualScrollContainer.scrollTarget = this.container;

      this.virtualScrollContainer.itemTemplate = (row, index) => this.rowTemplate(row, index); //eslint-disable-line
      this.virtualScrollContainer.itemCount = this.data.length;
      // TODO Dynamic Height setting - header height
      this.virtualScrollContainer.height = 350 - this.headerPixelHeight;
      this.virtualScrollContainer.itemHeight = this.rowPixelHeight;
      this.virtualScrollContainer.data = this.data;
    }

    this.#attachEventHandlers();

    if (this.data.length > 0) {
      this.setActiveCell(0, 0);
      this.#attachKeyboardListeners();
    }

    // Set back direction
    if (dir) {
      this.container.setAttribute('dir', dir);
    }
  }
/**
   * Rerender the list by re applying the template
   * @private
   */
Rerender the list by re applying the template
@private
Rerender the list by re applying the template @private
rerender() {
    if (this.columns.length === 0 && this.data.length === 0) {
      return;
    }
    const template = document.createElement('template');
    const dir = this.container?.getAttribute('dir');
    const html = this.template();
    this.shadowRoot.innerHTML = '';
    this.hasStyles = false;
    this.appendStyles();
    this.setColumnWidths();
    template.innerHTML = html;
    this.shadowRoot.appendChild(template.content.cloneNode(true));
    this.container = this.shadowRoot.querySelector('.ids-data-grid');
    if (IdsStringUtils.stringToBool(this.virtualScroll) && this.data.length > 0) {
      this.virtualScrollContainer = this.shadowRoot.querySelector('ids-virtual-scroll');
      this.virtualScrollContainer.scrollTarget = this.container;
      this.virtualScrollContainer.itemTemplate = (row, index) => this.rowTemplate(row, index); 
      this.virtualScrollContainer.itemCount = this.data.length;
      this.virtualScrollContainer.height = 350 - this.headerPixelHeight;
      this.virtualScrollContainer.itemHeight = this.rowPixelHeight;
      this.virtualScrollContainer.data = this.data;
    }
    this.#attachEventHandlers();
    if (this.data.length > 0) {
      this.setActiveCell(0, 0);
      this.#attachKeyboardListeners();
    }
    if (dir) {
      this.container.setAttribute('dir', dir);
    }
  }
rerender ( ) { if ( this . columns . length === 0 && this . data . length === 0 ) { return ; } const template = document . createElement ( 'template' ) ; const dir = this . container ?. getAttribute ( 'dir' ) ; const html = this . template ( ) ; this . shadowRoot . innerHTML = '' ; this . hasStyles = false ; this . appendStyles ( ) ; this . setColumnWidths ( ) ; template . innerHTML = html ; this . shadowRoot . appendChild ( template . content . cloneNode ( true ) ) ; this . container = this . shadowRoot . querySelector ( '.ids-data-grid' ) ; if ( IdsStringUtils . stringToBool ( this . virtualScroll ) && this . data . length > 0 ) { this . virtualScrollContainer = this . shadowRoot . querySelector ( 'ids-virtual-scroll' ) ; this . virtualScrollContainer . scrollTarget = this . container ; this . virtualScrollContainer . itemTemplate = ( row , index ) => this . rowTemplate ( row , index ) ; this . virtualScrollContainer . itemCount = this . data . length ; this . virtualScrollContainer . height = 350 - this . headerPixelHeight ; this . virtualScrollContainer . itemHeight = this . rowPixelHeight ; this . virtualScrollContainer . data = this . data ; } this . #attachEventHandlers ( ) ; if ( this . data . length > 0 ) { this . setActiveCell ( 0 , 0 ) ; this . #attachKeyboardListeners ( ) ; } if ( dir ) { this . container . setAttribute ( 'dir' , dir ) ; } }
Rerender the list by re applying the template
 @private
Rerender the list by re applying the template @private
// Render and append styles // Setup virtual scrolling /** @type {object} */ //eslint-disable-line // TODO Dynamic Height setting - header height // Set back direction