Hi,
I am using sidebar control to display the details of grid record, I have implemented successfully but i am getting small issue, when ever I am clicking on first record It is displaying side bar popup, after this when ever I am clicking on second row title, I am expecting first side bar popup should hide then second sidebar popup should display.
This is not happening. I have been stuck on this. It would be great, if i will get some code snippet for this task.
|
<SfSidebar @ref="leftSidebarInstance" Type=SidebarType.Push Width="250px" @bind-IsOpen="LeftToggle">
<ChildContent>
. . .
</ChildContent>
</SfSidebar>
<SfSidebar @ref="rightSidebarInstance" Width="250px" Position=SidebarPosition.Right @bind-IsOpen="RightToggle">
<ChildContent>
. . .
</ChildContent>
</SfSidebar>
<div class="text-content e-main-content">
<SfGrid DataSource="@Orders" AllowSorting="true" >
<GridEvents TValue="Order" RowSelecting="RowSelecting"></GridEvents>
<GridColumns>
. . .
</GridColumns>
</SfGrid>
</div>
@code {
public void RowSelecting(RowSelectingEventArgs<Order> args)
{
this.leftSidebarInstance.Toggle();
this.rightSidebarInstance.Toggle();
}
} |
Hi Shalini,
Thanks for sending exact code snippet. For me whenever i m clicking on show sidebar button and next time clicking anywhere of page, two sidebar panel are showing at one time.
is there any event for clicking anywhere of blazor page, so that i can make forcefully hide on sidebar panel ?
<SfSidebar Width="@GetSize(Size)"
Type="@SidebarType.Over"
@bind-IsOpen="@IsVisible"
CloseOnDocumentClick="true"
Position="@SidebarPosition.Right">
<ChildContent>
@Childcontent
</ChildContent>
</SfSidebar>