I have blazor web applications which contains Header bar (in first row) and I have used Tab in second row for page navigation.It works fine as per my requirement but I would like to know how to prevent page scolling when I use component inside the Tab control.
<SfTab Height="100%"> <TabItems> <TabItem> <HeaderTemplate>Grid</HeaderTemplate> <ContentTemplate> .................................................... </ContentTemplate> </TabItem> </TabItems> </SfTab> |
Thanks for reply..
Please check the below screencast and check my exact requirements..
https://www.screencast.com/t/Qv89JXqmCutg
<SfTab Height="100%">
<TabItems> <TabItem> <HeaderTemplate>Grid</HeaderTemplate> <ContentTemplate> <SfGrid DataSource="@Orders" Height="500px"> ...................................... </SfGrid> </ContentTemplate> </TabItem> </TabItems> </SfTab> |
thanks working fine
but how to set height as dynamically
<SfButton Content="Change Height" OnClick="OnHeightChange"></SfButton>
<SfTab Height="100%">
<TabItems>
<TabItem>
<HeaderTemplate>Grid</HeaderTemplate>
<ContentTemplate>
<SfGrid DataSource="@Orders" @bind-Height=@GridHeight>
. . .
</SfGrid>
</ContentTemplate>
</TabItem>
</TabItems>
</SfTab>
<style>
.e-tab > .e-content {
overflow-y: auto;
}
</style>
@code {
public string GridHeight = "500px";
. . .
public async Task OnHeightChange()
{
GridHeight = "300px";
}
. . .
} |