child grid not fully showing on expand

HI, I have a grid with a child grid, however when i am expanding on the records, not all records are displaying on first expansion. I have to collapse and then expand again for the full child Grid to display within the Main grids Row. 

Below i have copied the razor code i have used. 

Any help would be appriciated. 

Thanks

Paul 

@(Html.EJ().Grid<>
            ("AllPayments")
            //Grouping
            .AllowGrouping()
            .GroupSettings(group => { group.EnableDropAreaAutoSizing(false); })
            //Paging
            .AllowPaging()
            .PageSettings(ps => { ps.PageCount(1); ps.PageSize(1000); })
            //Sorting
            .AllowSorting()
            //.SortSettings(sort => sort.SortedColumns(col => col.Field("FromDate").Direction(SortOrder.Descending).Add()))
            //Filtering
            .AllowFiltering()
            .FilterSettings(filter => { filter.FilterType(Syncfusion.JavaScript.FilterType.Excel); })
            //Selection
            .AllowSelection()
            .SelectionType(SelectionType.Multiple)
            .SelectionSettings(select => { select.SelectionMode(mode => { mode.AddMode(SelectionMode.Row); }); })
            //Responsive
            .IsResponsive(true)
            // .EnableResponsiveRow(true)
            //Resizing
            //.AllowResizing()
            //.TextWrapSettings(wrap => { wrap.WrapMode(WrapMode.Both); })
            //.ColumnLayout(ColumnLayout.Fixed)
            //.ResizeSettings(resize => resize.ResizeMode(ResizeMode.Normal))
            //Mapping
            //.Mappers(map => map.ExportToWordAction("ExportToWord"))
            //Scrolling
            //.AllowScrolling()
            //.ScrollSettings(col => {col.AllowVirtualScrolling(true).VirtualScrollMode(VirtualScrollMode.Continuous); })
            //Persistance
            //.EnablePersistence(true)
            //Editing
            .EditSettings(edit => {
                edit.AllowEditing();
                edit.AllowAdding();
                edit.AllowDeleting();
                edit.EditMode(EditMode.Normal);
            })
        .ContextMenuSettings(contextMenu =>
        {
            if (HttpContext.Current.User.IsInRole("PaymentAuth"))
            {
                contextMenu.EnableContextMenu();
                contextMenu.DisableDefaultItems()
                .CustomContextMenuItems(new List<CustomContextMenuItems>()
                {
            new CustomContextMenuItems() { Id = "CustContextAmmend", Text = "Ammend Value" },
            new CustomContextMenuItems() { Id = "CustContextAddRem", Text = "Add or Remove Payment Lines" },
            new CustomContextMenuItems() { Id = "CustContextApprove", Text = "Approve Payment" },
            new CustomContextMenuItems() { Id = "CustContextReject", Text = "Reject Payment" },
            new CustomContextMenuItems() { Id = "CustContextAudit", Text = "Show Audit" },
                });
            }
        })
                .ToolbarSettings(toolbar =>
                {
                    toolbar.ShowToolbar()
                    .ToolbarItems(items =>
                    {
                        items.AddTool(ToolBarItems.Search);
                    });
                })
                .Columns(col =>
                {
                    col.Field("Id").Visible(false).IsPrimaryKey(true).Add();
                    col.Field("PAymentURN").HeaderText("Payment URN").AllowEditing(false).Add();
                    col.Field("PaymentStatus").HeaderText("Payment Status").AllowEditing(false).Add();
                    col.Field("CollaboratorName").HeaderText("Collaborator").AllowEditing(false).Add();
                    col.Field("ColaboratorAxNum").HeaderText("Finance System Number").AllowEditing(false).Add();
                    col.Field("Value").HeaderText("Value").Format("{0:c2}").AllowEditing(false).EditType(EditingType.NumericEdit).NumericEditOptions(new EditorProperties() { DecimalPlaces = 2 }).Add();
                    col.Field("CreatedDate").HeaderText("Created Date").Format("{0:dd/MM/yyyy}").AllowEditing(false).Add();
                    col.Field("UpdatedDate").HeaderText("Updated Date").Format("{0:dd/MM/yyyy}").AllowEditing(false).Add();
                }).ChildGrid(child =>
                {
                    child.Datasource(ds => ds.URL("/Payment/Payment/AdditionalPaymentDataSource").Adaptor(AdaptorType.UrlAdaptor).Offline(false))
                       .QueryString("Id")
                       .AllowPaging()
                       .Locale("en-GB")
                       .AllowSorting()
                        .SortSettings(sort => sort.SortedColumns(col => col.Field("Value").Direction(SortOrder.Descending).Add()))
                       .PageSettings(page => page.PageSize(5))
                       .Columns(col =>
                       {
                           col.Field("Id").Visible(false).Add();
                           col.Field("ParentPaymentId").Visible(false).Add();
                           col.Field("PaymentRate").HeaderText("Payment Rate").Add();
                           col.Field("RequestURN").HeaderText("Request URN").Add();
                           col.Field("Value").HeaderText("Value").Format("{0:c2}").Add();
                           col.Field("Notes").HeaderText("Notes").Add();
                       });
                })
            .ClientSideEvents(eve => eve.RecordDoubleClick("recordDoubleClick"))
            .ClientSideEvents(eve=> eve.DataBound("DataBound"))
            )

1 Reply

VN Vignesh Natarajan Syncfusion Team October 17, 2018 12:55 PM UTC

Hi Paul, 


Thanks for using Syncfusion products. 


From your query, we understand that you are facing issue (not all the records are shown in initial expansion) while expanding the child Grid. We have analyzed the provided code example and found that you have not bound dataSource to parent Grid and also you have used DataBound event. 

We have prepared a sample using your code example. We are not able to reproduce the reported issue since dataSource is not bounded to parent Grid. can you please share the following details which will be helpful for us to reproduce the reported issue at our end. 

  1. Share the full grid rendering code (along with ClientSideEvents actions)
  2. Share the details how you have bound the dataSource to the parent Grid.
  3. Is there any script error in the console window while expanding the child Grid . if yes share the screenshot for script error in console window.
  4. You have bound the child Grid with UrlAdaptor, can you please share the code example how you have returned the data from the server side.    

Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon