Masking PII in SfGrid and selectively disabling toolbar actions in SfPdfViewer?

Developing an internal portal for a fintech client using the Syncfusion Blazor component suite. The application handles highly sensitive client records, contracts, and financial statements.


Recently, an external legal compliance firm audited the client's data workflows and mandated strict UI-level enforcement for data visibility to comply with regional financial privacy regulations. Because of this, I need to lock down certain UI elements dynamically based on user roles.


I am running into two specific implementation roadblocks with the Syncfusion components:


SfGrid: Is there a built-in way to apply a visual data mask (e.g., showing only the last 4 digits of a tax ID or masking email addresses) directly at the GridColumn level based on the active user's authentication role, without altering or intercepting the underlying bound data model?


SfPdfViewer: We need to completely prevent users from saving or printing sensitive contracts. I know we can hide the entire toolbar, but is there a supported method to selectively disable or hide just the Download and Print buttons dynamically while keeping the zoom, search, and pagination controls active?


Any code snippets, workarounds, or documentation links on handling these specific UI restrictions would be greatly appreciated.


1 Reply

TD Tamilselvan Durairaj Syncfusion Team July 13, 2026 05:12 PM UTC

Hi ammaraamer,

SfGrid: Is there a built-in way to apply a visual data mask (e.g., showing only the last 4 digits of a tax ID or masking email addresses) directly at the GridColumn level based on the active user's authentication role, without altering or intercepting the underlying bound data model?



Thank you for the update. We have branched this query to the respective team. Please follow up on the updates related to this query using the forum referenced below - How to Apply Role-Based Data Masking in Syncfusion Blazor SfGrid Columns | Syncfusion Forum Assist

SfPdfViewer: We need to completely prevent users from saving or printing sensitive contracts. I know we can hide the entire toolbar, but is there a supported method to selectively disable or hide just the Download and Print buttons dynamically while keeping the zoom, search, and pagination controls active?

 

Yes, this scenario is supported in the Blazor PDF Viewer. You are not limited to hiding the entire toolbar; you can dynamically hide/show or enable/disable specific toolbar items such as Download and Print, while keeping other controls like Zoom, Search, and Page Navigation available.

 

Disable Download and Print

If you want the buttons to remain visible but prevent users from interacting with them, you can use the EnableToolbarItemsAsync method:

 

Code Snippet:

await Viewer.EnableToolbarItemsAsync(

new List<ToolbarItem>

{

ToolbarItem.PrintOption,

ToolbarItem.DownloadOption

},false);

 

This disables only the specified toolbar items.

 

Hide Download and Print

If you prefer to completely remove these options from the toolbar, you can use the ShowToolbarItemsAsync method:

 

Code Snippet:

await Viewer.ShowToolbarItemsAsync(

new List<ToolbarItem>

{

ToolbarItem.PrintOption,

ToolbarItem.DownloadOption

},false);

 

This hides only the Download and Print buttons while leaving the remaining toolbar items accessible.

Find the attached sample for more reference.


Regards,

Tamilselvan Durairaj


Attachment: BlazorWebApp_f41a7366.zip

Loader.
Up arrow icon