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
close icon

2 Issues when using paging

Issue #1
When I use Paging and there is only one Record, the row is sized too small,
Here is the code.  The row height is fine if I don't use paging.  It seems like the ScrollSetting doesn't account for the Paging Control at the bottom.

<div>
        @(Html.EJ().Grid<Request>("HaaSGrid")                          
                            .EditSettings(edit => { edit.AllowEditing(); })
                            .AllowScrolling(true)
                            .AllowPaging(true)
                            .PageSettings(a => a.PageSize(50))
                            .ScrollSettings(col => { col.Height("100%"); })
                            .MinWidth(400)
                            .IsResponsive(true)

Issue #2
The page total always shows the total for the whole recordset even if I'm filtering.  I would like the the total and the number of pages to reflect only the total records that match the filter.
IE. Like below: PageSize is 50 and there are 548 record and the recordset is unfiltered.
But if I filter the Recordset, using the Grid Filter control at column header, say that only 80 records match then there should only be 2 page selectors and the total should show 1 of 2 pages (80 Items)



Thanks

5 Replies

JK Jayaprakash Kamaraj Syncfusion Team January 6, 2017 12:39 PM UTC

Hi Michael, 
 
Thank you for contacting Syncfusion support. 
 
Issue 1: 
 
We suspect that you are using hierarchy or detail Grid in your project. But, we don’t have responsive support for hierarchy and Detail Grid. Please share the following information to find the cause of the issue. 
 
1.     Share the video to show the issue. 
2.     Essential studio and browser version details. 
3.     Are you dynamically  binding the grid dataSource ? 
4.     Share your both client and server side code example. 
5.     Are you using any Adaptors in Grid. If, yes please mention the Adaptor type. 
6.     Is there any script error or exception thrown in your project? If so, attach the screenshot of your stack trace.    
7.     If possible, provide an issue reproducing sample or hosted link.   
 
Issue #2: 
 
We suspect that you are using UrlAdaptor in Grid. So, we suggest you to handle all the grid actions (sorting, filtering, editing, paging and searching) in server side. We have already discussed the same in following knowledge base document. 
 

@(Html.EJ().Grid<SyncfusionMvcApplication7.Models.ModelT>("GridContainer") 
            .Datasource(ds => ds.URL("/home/DataSource").Adaptor("UrlAdaptor")) 
.Query(queryString) 
 
.. 
 
.Columns(col => 
{ 
    col.Field("ModelTID").HeaderText("ID").IsPrimaryKey(true).IsIdentity(true).Visible(false).Add(); 
    col.Field("Name").HeaderText("Name").Add(); 
    col.Field("Age").HeaderText("Age").EditType(EditingType.Numeric).Add(); 
    col.Field("Date").HeaderText("Date").Add(); 
}) 
) 
 
HomeController.cs 
 
public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm) 
        { 
             IEnumerable Data = new NORTHWNDEntities().C30000Records.ToList(); 
 
            Syncfusion.JavaScript.DataSources.DataOperations operation = new Syncfusion.JavaScript.DataSources.DataOperations(); 
            if (dm.Sorted != null && dm.Sorted.Count > 0) //Sorting 
            { 
                Data = operation.PerformSorting(Data, dm.Sorted); 
            } 
            if (dm.Where != null && dm.Where.Count > 0) //Filtering 
            { 
                Data = operation.PerformWhereFilter(Data, dm.Where, dm.Where[0].Operator); 
            } 
            if (dm.Search != null && dm.Search.Count > 0) //searching 
            { 
                Data = operation.PerformSearching(Data, dm.Search); 
            } 
            int count = Data.AsQueryable().Count(); 
            if (dm.Skip != 0) 
            { 
                Data = operation.PerformSkip(Data, dm.Skip); 
            } 
            if (dm.Take != 0) 
            { 
                Data = operation.PerformTake(Data, dm.Take); 
            } 
            return Json(new { result = Data, count = count }, JsonRequestBehavior.AllowGet); 
        } 

 
Regards, 
 
Jayaprakash K. 



ML Michael Lambert January 18, 2017 05:27 PM UTC

Your response to Issue #2 solved that problem.  Thanks.

In regards to issue 1 though:
It happens across all browser types (IE, Edge, FireFox, Chrome) and different version.  And no browser errors.
This error happens with grids using and NOT using detail grids.
Also in my previous post I stated that it was only happening with paging, after further testing it is happening no matter if using paging or not.
Is there a way to specify a min Height for a row?
Here is the binding:
        @(Html.EJ().Grid<Request>("HaaSGrid")
                            .Datasource(ds=> ds.URL(@Url.Action("GetData", "AdminHaaS")).UpdateURL(@Url.Action("Update", "AdminHaaS")).Adaptor(AdaptorType.UrlAdaptor))
                            .EditSettings(edit => { edit.AllowEditing(); })
                            .AllowScrolling(true)
                            .AllowPaging(true)
                            .PageSettings(a => a.PageSize(50))
                            .ScrollSettings(col => { col.Height("100%"); })
                            .MinWidth(400)
                            .IsResponsive(true)
                            .AllowFiltering()
                            .FilterSettings(filter => { filter.FilterType(FilterType.Excel); })
                            .AllowSearching(true)
                            .AllowSorting(true)
                            .AllowMultiSorting(true)
                            .AllowTextWrap(true)
                            .AllowResizing(true)
                            .AllowReordering(true)
                            .DetailsTemplate("#tabGridContents")
                            .ClientSideEvents(eve => { eve.DetailsDataBound("detailGridData"); })
                            .ShowColumnChooser()

Controller Code: GetData
            System.Collections.IEnumerable Data = db.Requests.ToList()
            Syncfusion.JavaScript.DataSources.DataOperations operation = new Syncfusion.JavaScript.DataSources.DataOperations();
            if (dm.Sorted != null && dm.Sorted.Count > 0) //Sorting
                Data = operation.PerformSorting(Data, dm.Sorted);
            if (dm.Where != null && dm.Where.Count > 0) //Filtering
                Data = operation.PerformWhereFilter(Data, dm.Where, dm.Where[0].Operator);
            if (dm.Search != null && dm.Search.Count > 0) //searching
                Data = operation.PerformSearching(Data, dm.Search);

            int count = Data.AsQueryable().Count();

            if (dm.Skip != 0)
                Data = operation.PerformSkip(Data, dm.Skip);
            if (dm.Take != 0)
                Data = operation.PerformTake(Data, dm.Take);
            return Json(new { result = Data, count = count }, JsonRequestBehavior.AllowGet);




JK Jayaprakash Kamaraj Syncfusion Team January 19, 2017 01:21 PM UTC

Hi Michael, 
 
If you don’t want height responsive in Grid. We suggest you to remove height as 100% in scrollSettings of Grid. Because height responsive will work when you set height as 100% in scrollSettings of Grid.  
 
Please share the following information to find the cause of the issue.  
  
1.     Are you rendered Grid inside the container? 
2.     The scenario in which you are facing the issue. Please explain the clear replication procedure or scenario.     
3.     Share your full client and server side code example. 
4.     Share the video to show the issue. 
5.     Essential studio version detail. 
 
Regards, 
 
Jayaprakash K. 



ML Michael Lambert January 19, 2017 07:22 PM UTC

Hello,
I narrowed the issue down.  It appears that it only occurs when the Horizontal Scrollbar is visible.  The Grid needs to increase it's height by the height of the scrollbar when it is visual, else the scrollbar will overlay the grid contents...


JK Jayaprakash Kamaraj Syncfusion Team January 20, 2017 12:05 PM UTC

Hi Michael, 
A support incident has been created under your account to resolve the issue. Please log on to our support website to check for further updates.  
 
Regards,
Jayaprakash K.
 


Loader.
Live Chat Icon For mobile
Up arrow icon