Enterprise-ng: Datagrid stretch column does not work in IE

Created on 23 Apr 2019  路  11Comments  路  Source: infor-design/enterprise-ng

Describe the bug
In internet explorer strechColumn option does not work and datagrid does not use full available size

To Reproduce
Steps to reproduce the behavior:

  1. Go to ng demo app
  2. Click on DataGrid - Editors or DataGrid - Standard Formatter or TreeGrid or TreeGrid Dynamic Filter
  3. See error

Expected behavior
If stretchColumn is set, use that to expand such column to make sure that grid is always full available width

Version

  • ids-enterprise-ng: 5.1.0

Screenshots
image

[2] cant reproduce type

All 11 comments

This does appear to work in this example so maybe this is an angular issue http://master-enterprise.demo.design.infor.com//components/datagrid/test-columns-stretch-column.html

What did you set it to to reproduce?

html

<div class="row">
  <div class="twelve columns">
    <h2 class="fieldset-title">Soho Data Grid - Custom Formatter Service</h2>
    <p>
      Broken stretch column
    </p>
  </div>
</div>

<br>
<div class="row top-padding">
  <div class="twelve columns demo" role="main">
    <div soho-datagrid *ngIf="gridOptions" [gridOptions]="gridOptions">
    </div>
  </div>
</div>

component ts

import {
  AfterViewInit,
  ChangeDetectionStrategy,
  Component, OnInit,
  ViewChild
} from '@angular/core';
import {
  SohoDataGridComponent,
} from 'ids-enterprise-ng';
import {
  PAGING_COLUMNS,
  PAGING_DATA
} from './datagrid-paging-data';
import { DataGridCustomFormatterService } from './datagrid-custom-formatter.service';

@Component({
  selector: 'app-datagrid-custom-formatter-service-demo',
  templateUrl: './datagrid-custom-formatter-service.demo.html',
  providers: [ DataGridCustomFormatterService ],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class DataGridCustomFormatterServiceDemoComponent implements OnInit {
  @ViewChild(SohoDataGridComponent) sohoDataGridComponent: SohoDataGridComponent;

  gridOptions: SohoDataGridOptions = undefined;

  RandomIntegerFormatter = (row, cell, value, column, item, api): string => {
    return this.formatterService.randomIntegerFormatter(row, cell, value, column, item, api);
  }

  constructor(private formatterService: DataGridCustomFormatterService) {}

  ngOnInit(): void {
    /**
     * Add a column for the custom formatter
     */
    const columns: SohoDataGridColumn[] = [];

    PAGING_COLUMNS.forEach(element => columns.push(element));

    this.gridOptions = {
      columns: columns,
      dataset: PAGING_DATA,
      selectable: 'single',
      stretchColumn: 'productName'
    };
  }
}

columns
``export const PAGING_COLUMNS: SohoDataGridColumn[] = [ { id: 'selectionCheckbox', sortable: false, resizable: false, formatter: Soho.Formatters.SelectionCheckbox, align: 'center', exportable: false }, { id: 'productId', name: 'Product Id', field: 'productId', sortable: false, filterType: 'integer', formatter: Soho.Formatters.Readonly }, { id: 'productName', name: 'Product Name', field: 'productName', sortable: false, filterType: 'text', filterConditions: ['equals', 'contains'], width: 150, formatter: Soho.Formatters.Hyperlink }, { id: 'activity', name: 'Activity', field: 'activity', sortable: false, filterType: 'text', hidden: true }, ];

Which example did you update this on?

datagrid-custom-formatter-service.demo

Tried this out and it seemed to work ok for me.

Archive.zip

Hello @tmcconechy ,

I just did that and this is the result (Internet Explorer -> this is only about IE not working)
image

I got this in IE 11 - Windows 10 I did notice if you close the menu it doesnt resize, but that was a known limitation.

Screen Shot 2019-04-26 at 4 01 18 PM

I'm using windows 10, IE 11 aswell. No resizing involved. That's odd - we see this issue in our product that uses 5.1.0 enterprise-ng.

Are you able to test 5.3.0? I still was not able to reproduce

Hello @tmcconechy,

I just checked with 5.3.0 and the issue seems to be fixed
image

Excellent 馃憤

Was this page helpful?
0 / 5 - 0 ratings