Splitter scroll

Dear forum !

Splitting a DIV with a calculated height with a Splitter: We place a 100% high TAB element on the upper Splitter part, and a 100% high component as the content of the first TAB item. In the browser, the Scrollbar is connected to the upper Spitter element (scrolling down like this: the TAB elements and the toolbar connected to the grid disappear).

Splitter1.png

We want the scrollbar to only scroll the grid rows!

Splitter2.png


What can be the solution?

Thank you in advance for your help!







6 Replies 1 reply marked as answer

VJ Vinitha Jeyakumar Syncfusion Team September 26, 2022 12:06 PM UTC

Hi Szoke,


Using the information, you have provided, we have tried to replicate your use case scenario. but unfortunately, we didn't face any issues as you reported. we have also prepared a sample for your reference,


Can you please share the details below?

  • Issue reproducing video illustration.
  • Entire code snippet.
  • Are you using Grid control inside Tab.
  • If possible, please share us with the issue reproducing runnable sample to further validate on our end.

Regards,
Vinitha


SZ Szoke replied to Vinitha Jeyakumar March 6, 2023 09:06 PM UTC

Hi Vinitha.

Sorry for the late response, but I just got back. This would be the sample code:


@page "/"

@using Syncfusion.Blazor.Layouts

<div class="befoglalo">

    <SfSplitter Height="100%" Width="100%" Orientation="Orientation.Vertical">

        <SplitterPanes>

            <SplitterPane>

                <ContentTemplate>

                    <div> Top

                        <Syncfusion.Blazor.Grids.SfGrid ID="Grid1" TValue="Order" DataSource=Orders Height="100%" ></Syncfusion.Blazor.Grids.SfGrid>

                    </div>

                </ContentTemplate>

            </SplitterPane>

            <SplitterPane>

                <ContentTemplate>

                    <div> Bottom

                        <Syncfusion.Blazor.Navigations.SfTab>

                            <Syncfusion.Blazor.Navigations.TabItems>

                                <Syncfusion.Blazor.Navigations.TabItem>

                                <HeaderTemplate>First tab</HeaderTemplate>

                                    <ContentTemplate>

                                        <Syncfusion.Blazor.Grids.SfGrid ID="Grid2" TValue="EmployeeData" DataSource=Employees Height="100%"></Syncfusion.Blazor.Grids.SfGrid>

                                    </ContentTemplate>

                                </Syncfusion.Blazor.Navigations.TabItem>

                                <Syncfusion.Blazor.Navigations.TabItem>

                                <HeaderTemplate>Second tab</HeaderTemplate>

                                    <ContentTemplate>

                                        <Syncfusion.Blazor.Grids.SfGrid ID="Grid3" TValue="Order" DataSource=Orders Height="100%"></Syncfusion.Blazor.Grids.SfGrid>

                                    </ContentTemplate>

                                </Syncfusion.Blazor.Navigations.TabItem>

                            </Syncfusion.Blazor.Navigations.TabItems>

                        </Syncfusion.Blazor.Navigations.SfTab>

                    </div>

                </ContentTemplate>

            </SplitterPane>

        </SplitterPanes>

    </SfSplitter>

</div>

<style>

    .befoglalo {

        height: calc(100vh - 6.5rem);

    }

</style>

@code {

    public List<Order> Orders { get; set; }

    public List<EmployeeData> Employees { get; set; }

    protected override void OnInitialized()

    {

        Orders = Enumerable.Range(1, 75).Select(x => new Order()

            {

                OrderID = 1000 + x,

                EmployeeID = x,

                Freight = 2.1 * x,

                OrderDate = DateTime.Now.AddDays(-x),

            }).ToList();

        Employees = Enumerable.Range(1, 75).Select(x => new EmployeeData()

            {

                EmployeeID = x,

                FirstName = (new string[] { "Nancy", "Andrew", "Janet", "Margaret", "Steven" })[new Random().Next(5)],

            }).ToList();

    }

    public class Order

    {

        public int? OrderID { get; set; }

        public int? EmployeeID { get; set; }

        public DateTime? OrderDate { get; set; }

        public double? Freight { get; set; }

    }

    public class EmployeeData

    {

        public int? EmployeeID { get; set; }

        public string FirstName { get; set; }

    }

}



And the desire would be for the Grids to be able to use their own scroll bar (use the space of the height given by the splitter).


Splitter.png


Thank you in advance for your help!




VJ Vinitha Jeyakumar Syncfusion Team March 7, 2023 12:22 PM UTC

Hi Szoke,

Your reported issue can be resolved by setting Size and Min property to the Splitter pane and by setting Height property to the Grid control just like below,

Code snippet:
@using Syncfusion.Blazor.Layouts
@using Syncfusion.Blazor.Grids

<div class="befoglalo">

    <SfSplitter Height="700px" Width="100%" Orientation="Orientation.Vertical">
        <SplitterPanes>
            <SplitterPane Size="300px" Min="300px">
                <ContentTemplate>
                    <div> Top
                        <SfGrid ID="Grid1" TValue="Order" DataSource=Orders Height="200px" Width="100%"></SfGrid>
                   </div>
                </ContentTemplate>
           </SplitterPane>
            <SplitterPane Size="300px" Min="300px">

                <ContentTemplate>

                    <div> Bottom
                        <Syncfusion.Blazor.Navigations.SfTab>
                            <Syncfusion.Blazor.Navigations.TabItems>
                                <Syncfusion.Blazor.Navigations.TabItem>
                                <HeaderTemplate>First tab</HeaderTemplate>
                                    <ContentTemplate>
                                        <Syncfusion.Blazor.Grids.SfGrid ID="Grid2" TValue="EmployeeData" DataSource=Employees Height="200px"></Syncfusion.Blazor.Grids.SfGrid>

                                    </ContentTemplate>
                                </Syncfusion.Blazor.Navigations.TabItem>
                                <Syncfusion.Blazor.Navigations.TabItem>
                                <HeaderTemplate>Second tab</HeaderTemplate>
                                    <ContentTemplate>

                                        <Syncfusion.Blazor.Grids.SfGrid ID="Grid3" TValue="Order" DataSource=Orders Height="200px"></Syncfusion.Blazor.Grids.SfGrid>

                                    </ContentTemplate>
                                </Syncfusion.Blazor.Navigations.TabItem>
                            </Syncfusion.Blazor.Navigations.TabItems>
                        </Syncfusion.Blazor.Navigations.SfTab>
                    </div>
                </ContentTemplate>
            </SplitterPane>
        </SplitterPanes>
    </SfSplitter>
</div>




Regards,
Vinitha


SZ Szoke March 8, 2023 08:20 PM UTC

Hi Vinitha !

But it would be the requirement to fill the Browser ViewPort 2 Grid Responsively:

Splitter2.png


Marked as answer

VJ Vinitha Jeyakumar Syncfusion Team March 29, 2023 07:31 AM UTC

Hi Szoke,

Currently, we are validating the queries you have reported. We will provide you with further details as soon as possible.

Regards,
Vinitha




BS Buvana Sathasivam Syncfusion Team April 18, 2023 12:31 PM UTC

Hi Szoke,


Thank you for your patience.


You can meet your requirement by incorporating the styles listed below into your application. Please find the below code and attached sample for your reference.

<div class="befoglalo">

 

    <SfSplitter Height="100%" Width="100%" Orientation="Orientation.Vertical">

 

        <SplitterPanes>

 

            <SplitterPane Size="50%">

 

                <ContentTemplate>

 

                    <div style="height: 100%"> Top

 

                        <Syncfusion.Blazor.Grids.SfGrid ID="Grid1" TValue="Order" DataSource=Orders Height="100%"></Syncfusion.Blazor.Grids.SfGrid>

 

                    </div>

 

                </ContentTemplate>

 

            </SplitterPane>

 

            <SplitterPane Size="50%">

 

                <ContentTemplate>

 

                    <div style="height: 100%"> Bottom

 

                        <Syncfusion.Blazor.Navigations.SfTab Height="100%">

 

                            <Syncfusion.Blazor.Navigations.TabItems>

 

                                <Syncfusion.Blazor.Navigations.TabItem>

 

                                <HeaderTemplate>First tab</HeaderTemplate>

 

                                    <ContentTemplate>

 

                                        <Syncfusion.Blazor.Grids.SfGrid ID="Grid2" TValue="EmployeeData" DataSource=Employees Height="100%"></Syncfusion.Blazor.Grids.SfGrid>

                                    </ContentTemplate>

 

                                </Syncfusion.Blazor.Navigations.TabItem>

 

                            </Syncfusion.Blazor.Navigations.TabItems>

 

                        </Syncfusion.Blazor.Navigations.SfTab>

 

                    </div>

 

                </ContentTemplate>

 

            </SplitterPane>

 

        </SplitterPanes>

 

    </SfSplitter>

 

</div>

 

<style>

 

    .befoglalo {

 

        height: calc(100vh - 6.5rem);

 

    }

    .e-splitter.e-splitter-horizontal .e-pane, .e-splitter.e-splitter-vertical .e-pane {

        overflow: hidden !important;

    }

    .e-tab .e-content>.e-item {

        height: 100%;

    }

</style>

 



Regards,

Buvana S


Attachment: SplitterServer_1f0c685b.zip

Loader.
Up arrow icon