We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

scroll is not coming when i reduce screen size

when i reduce window screen size i am not getting a scroll instead content in grid is getting hidden
i am giving width as 100% in grid
only at very screen size i am getting a scroll
<ejs-grid #grid [dataSource]='paginationData' [selectionSettings]='selectionSettings' [pageSettings]='initialPage' [editSettings]='editSettings'
[allowPaging]="true" [allowSorting]="true" (rowSelecting)="select($event)" width="100%" (checkBoxChange)="change($event)">
</ejs-grid>

1 Reply

PS Pavithra Subramaniyam Syncfusion Team June 20, 2019 10:36 AM UTC

Hi thowfik,  

Greetings from Syncfusion. 

In Essential JavaScript 2 Grid, horizontal scrollbar will be rendered while the total columns width is greater than the Grid element width. While using auto generated columns, the column with will not be set so it will be hidden while resizing with “100%” width. So we suggested you to set a fixed width to the columns to achieve your requirement as below. 

[Component.ts] 
@Component({ 
    selector: 'app-root', 
    template: “<ejs-grid #grid [dataSource]='data' [selectionSettings]='selectionSettings' [pageSettings]='initialPage' [editSettings]='editSettings' 
            [allowPaging]="true" [allowSorting]="true" (dataBound)="dataBound($event)" width="100%"> 
  </ejs-grid>” 

}) 
export class AppComponent { 
     .   .   .  
    dataBound(e){ 
      if(this.initial){ 
     for (var i = 0; i < this.grid.columns.length; i++) { 
            (this.grid.columns[i] as any).width = 80; 
      } 
      this.grid.refreshColumns(); 
      this.initial = false; 
      } 
    } 




Please get back to us if you need any further assistance on this. 

Regards, 
Pavithra S. 


Loader.
Up arrow icon