Custom dialog pivot table drill through
Looking for a way to cancel the drill through dialog in the pivot table, and replace it with a custom one. Found this article but it's incomplete.
Please provide an example for Blazor.
Hi John,
We understand that you want to restrict the functionality of the current drill-through dialog and instead implement a custom dialog in the Blazor Pivot Table. However, we've documented this request as a Knowledge Base article for the ASP.NET Core platform, where you can find a sample demonstrating this functionality. Meanwhile, we've prepared a solution for the Blazor platform that meets your requirements. Please refer to the provided code example below for more details.
Code Example:
|
<SfPivotView TValue="ProductDetails" @ref="pivot" Width="100%" ShowFieldList="true" AllowDrillThrough="true"> <PivotViewEvents TValue="ProductDetails" DrillThrough="drillThrough"></PivotViewEvents> </SfPivotView>
// Custom Dialog Component. <SfDialog Target="#target" @ref="Dialog" Width="500px" ShowCloseIcon="true" Visible="false"> <DialogTemplates> <Header> About SYNCFUSION succinctly series </Header> <Content> <p> In the Succinctly series, Syncfusion created a robust, free library of more than 130 technical e - books formatted for PDF, Kindle, and EPUB.<br> <br> The Succinctly series was born in 2012 out of a desire to provide concise technical e-books for software developers. Each title in the Succinctly series is written by a carefully chosen expert and provides essential content in about 100 pages. </p> </Content> </DialogTemplates> <DialogButtons> <DialogButton IsPrimary="true" Content="CANCEL" OnClick="@OnBtnClick" /> </DialogButtons> </SfDialog>
@code { SfPivotView<ProductDetails> pivot; private SfDialog Dialog { get; set; }
// Close the dialog unsing the button. private async Task OnBtnClick() { await Dialog.HideAsync(); }
private async Task drillThrough(DrillThroughEventArgs args) { // Restrict the existing dialog here. args.Cancel = true; // And display the custom dialog here. await Dialog.ShowAsync(); } } |
Output screenshot:
Please let us know if you have any concerns.
Regards,
Angelin Faith Sheeba.
Attachment: PivotTable_e72a329b.zip
Thanks for the prompt response, this worked perfectly.
Great component, very easy to use.
Hi John,
You're welcome. We glad it worked on your end; we are delighted to help you. Please get back to us if you need any further assistance.
Regards,
Jayashree
- 3 Replies
- 3 Participants
-
JG JOHN GOMECK
- Mar 10, 2024 11:15 PM UTC
- Mar 12, 2024 07:35 AM UTC