Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

igx-grid dynamic column with columnHiding not working #3085

Closed
nikunjgajera opened this issue Nov 21, 2018 · 1 comment
Closed

igx-grid dynamic column with columnHiding not working #3085

nikunjgajera opened this issue Nov 21, 2018 · 1 comment
Assignees

Comments

@nikunjgajera
Copy link

I am new in Ignite UI angular.

I create table using igx-grid with dynamic column but in my case column created perfectly but columnHiding not showing all column name.

I am using below code demo for create grid with dynamic column

https://stackblitz.com/edit/igx-grid-ngfor-columns

this working perfectly, but i am calling backend API for get data and header.

so i can change app.component.ts using setTimeout

import { Component, ViewChild, ChangeDetectorRef } from '@angular/core';
import { IgxGridComponent } from "igniteui-angular";
import { localData } from './data';

@Component({
  selector: 'my-app',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  @ViewChild("grid1") public grid1: IgxGridComponent;	
  @ViewChild("grid2") public grid: IgxGridComponent;
  private data;
	private columns:any;

	constructor() { }

	public ngOnInit(): void {
    var self = this;
    setTimeout(function() {
      self.columns = [
        { field: "EmployeeID", width: "100px", type: "number" },
        { field: "FirstName", width: "200px", type: "string" },
        { field: "LastName", width: "100px", type: "string" },
        { field: "Country", width: "50px", type: "string" },
        { field: "Age", width: "200px", type: "number" },
        { field: "RegistererDate", width: "50px", type: "date" },
        { field: "IsActive", width: "50px", type: "boolean" }
      ];

      self.data = localData;
    }, 4000);
	}
}

you can try this code in that url and check response

@rmkrmk rmkrmk added 🛠️ status: in-development Issues and PRs with active development on them and removed 🆕 status: new labels Nov 26, 2018
@kdinev kdinev added 🐛 bug Any issue that describes a bug 🧨 severity: medium labels Nov 29, 2018
@tachojelev tachojelev mentioned this issue Nov 29, 2018
rkaraivanov pushed a commit that referenced this issue Dec 6, 2018
* fix(grid): fixing column chooser column updating #3085

* fix(grid): changing binding from columnList to columns #3085

* fix(grid): changing binding from columnList to columns #3085

* Merge branch 'rkolev/fix-3085-7.0.x' of https://github.com/IgniteUI/igniteui-angular into rkolev/fix-3085-7.0.x
rkaraivanov pushed a commit that referenced this issue Dec 6, 2018
* fix(grid): fixing column chooser column updating #3085

* fix(grid): changing binding from columnList to columns #3085

* fix(grid): changing binding from columnList to columns #3085

* fix(grid): removing recreation of the columns array #3085
@rkaraivanov
Copy link
Member

Closed via #3268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants