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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

scroll is not coming when i reduce screen size

Thread ID:

Created:

Updated:

Platform:

Replies:

145365 Jun 19,2019 07:52 AM UTC Jun 20,2019 10:36 AM UTC Angular - EJ 2 1
loading
Tags: Grid
thowfik
Asked On June 19, 2019 07:52 AM UTC

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>

Pavithra Subramaniyam [Syncfusion]
Replied On 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. 


CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon