The observed issue is caused by the fact, that when the "Search" button is clicked, another Spreadsheet will be initialized.
To avoid this you could perform an additional check if the widget has been initialized. This way you could initialize it only if it is needed. Then you could load the dataSource as per the requirements.
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
var sheet = spreadsheet.activeSheet();
Here is the modified Dojo example.
I hope, that the above helps you. In case you have any other questions, please do not hesitate to contact us.
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).