Record by Default render 12, and Header Fixed,

Hi

Facing two problems can you help me.

I'm using (syncfusion ejs2 grid) in MVC 5

1. grid record by default render 12, my need its 25. 

for reference code
.AllowPaging().PageSettings(page => page.PageCount(4).PageSizes(new string[] { "25", "50", "100", "200", "All"}))
its not working on 25.
its load 12 row.


2. I need grid header fixed, without scroll option,
like (Data Table Fix header) option,
Fixed navbar class

5 Replies

SK Sujith Kumar Rajkumar Syncfusion Team May 15, 2020 09:24 AM UTC

Hi Rizwan, 
 
Greetings from Syncfusion support. 
 
Query – 1: Grid record by default render 12, my need its 25.  
 
From your query we could see that you wish to render 25 records in a page. For this you need to set the pageSize property of the pageSettings as demonstrated in the below code snippet, 
 
PageSettings(page => page.PageSize(25)) 
 
The pageSize property defines the number of records to be displayed in a page. While the pageSizes property renders a dropdown in the pager which allows you to dynamically change the page size from the defined set of values. This is shown in the below image, 
 
 
 
Query – 2: I need grid header fixed, without scroll option 
 
If you need to set the Grid header to a fixed position, then we suggest you to set the height to the Grid component. This will render scroll for the records and keep the header in a fixed position. 
 
@Html.EJS().Grid("FlatGrid").Height("400px") 
 
We have prepared a sample based on the above queries for your reference. You can download it from the following link, 
 
 
Please get back to us if you require any further assistance. 
 
Regards, 
Sujith R 



RI Rizwan May 15, 2020 10:42 AM UTC

Thank You for Support,
1st Query has been resolved.

But the 2nd is remaining
in need, no side scroll in grid and header fixed in the navbar


SK Sujith Kumar Rajkumar Syncfusion Team May 18, 2020 09:54 AM UTC

Hi Rizwan, 

We are glad to hear that your first query has been resolved. 
 
As for your other query, the Grid’s default behavior does not support fixing the header position. If the header is set to fixed position it might cause content misalignment based on the current architecture so this is not supported with the Grid. 

So if you need the header fixed we suggest you to use the method provided in our previous response. 

Let us know if you have any concerns. 

Regards, 
Sujith R 



RI Rizwan May 18, 2020 10:20 AM UTC

Ok Thank you, for support


SK Sujith Kumar Rajkumar Syncfusion Team May 19, 2020 04:54 AM UTC

Hi Rizwan, 

We are happy to assist you with your queries. Please get back to us if you require any further assistance. 

Regards, 
Sujith R 


Loader.
Up arrow icon