Is there a way to sticky the header columns while vertically scrolling through the Grid?
I found the suggested solution mentioned here:
SfGrid - How to freeze headers upon scroll | Blazor Forums | Syncfusion
The solution does not work for me.
But my MainLayout razor page isn't the generic one and I have a SfSidebar with fixed top navbar as shown in the attached file. Is there a workaround for such a situation?
Also, I am noticing that on the SfSidebar, when I open all the SfTreeView elements, the scroll for the Sidebar does not cover all the child elements.
|
[index.razor]
<style>
.e-sidebar-context{
overflow-x: unset;
}
.e-grid .e-gridheader {
position: -webkit-sticky;
position: sticky;
top: 56px;
z-index: 1;
}
.sf-license-warning {
display: none;
}
</style> |
|
/* end of table ofcontent area styles */
/* content area styles */
/* #main-text.main-content {
overflow: hidden;
}
*/ |
|
<SfSidebar ID="sidebar1" HtmlAttributes="@HtmlAttribute" Width="290px" Target=".main-content" @ref="Sidebar" MediaQuery="(min-width:600px)"
@bind-IsOpen="SidebarToggle" Type="SidebarType.Auto"EnableGestures="false">
<ChildContent>
<div class="main-menu">
<div>
<SfTreeView CssClass="main-treeview" @ref="TreeView"ExpandOn="@Expand" TValue="TreeData" FullRowNavigable="true">
<TreeViewEvents TValue="TreeData"></TreeViewEvents>
<TreeViewFieldsSettings Id="nodeId" Text="nodeText"IconCss="iconCss" DataSource="treedata" HasChildren="hasChild"
ParentID="pid"NavigateUrl="navigateUrl">
</TreeViewFieldsSettings>
</SfTreeView>
</div>
</div>
</ChildContent>
</SfSidebar>
<style>
#sidebar1 {
height: calc(100vh - 50px);
}
</style> |
Hello
Could you please update the code sample for the latest versions of 20.2.43 and NET controls. 6.
I tried to do this but the app works differently from the original pattern.
I really care about the stationary menu bar for all subpages (while scrolling, the menu bar should be visible at the top of the screen all the time).
Regards
Bogdan
Hi Bogdan,
Welcome from Syncfusion support.
We have analyzed the query and we have made a solution file based on your requirement.NET6 with latest version(20.2.0.44).Kindly refer to the attached solution file for your reference.
Please get back to us if you have any further queries.
Regards,
Keerthana.