Prevent TabSplitter from closing when containing edit hasn't been saved

In my application I have a TabSplitter control with multiple tabs.

I want to prevent that the user closes a table while the editor contents is not saved.

I also want to prevent that the user closed the last tab. (and thereby closing the entire TabSplitter)


Is there a way to intercept the Close button and perform my own checks and cancel the close action if the checks fail?



2 Replies

MJ Madhumithan Jayapathi Syncfusion Team July 21, 2023 01:44 PM UTC

Hi Johan,

We are validating the reported query and there is no direct support to check conditions before closing of the TabSplitter so we are working on a workaround to achieve this condition and we will update you with complete details or solution on or before 25th July. We appreciate your patience until then.

Regards,
Madhumithan Jayapathi



MJ Madhumithan Jayapathi Syncfusion Team July 25, 2023 12:35 PM UTC

Hi Johan,


We have validated your query and there is no direct support to check conditions before closing of the TabSplitter, However we have found a workaround to check conditions before closing of the TabSplitter by using a custom style to the control. We have attached a sample application for your reference and please let us know if you need any further assistance.


Regards,
Madhumithan Jayapathi


Attachment: TabSplitter_a14a42a.zip

Loader.
Up arrow icon