Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142488 | Feb 6,2019 09:19 AM UTC | Feb 7,2019 11:34 AM UTC | Angular | 1 |
![]() |
Tags: ejGrid |
<script>
var value = window.sessionStorage.getItem('hideColumn');
window.sessionStorage.setItem('hideColumn', true);
</script>
Grid.html:-
<button class="btn btn-primary" (click)="hideColumn();" type="button">Hide Column</button>
<ej-grid [allowPaging]="true" [allowSorting]="true" [dataSource]="gridData">
<e-columns>
<e-column headerText="Manage Records" width="75" textAlign="right">
</e-column>
</ej-grid>
Grid.ts:-
public gridData: any;
hideColumn() : any {
if(value=="true"){
var obj = $("#ejControl_0").ejGrid("instance");
obj.hideColumns("Manage Records");
}
}
constructor()
{
this.gridData = [{
. . . .
}];
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.