How to refresh selected tab instead all tab using Syncfusion ej2? - syncfusion

I have a few tabs opened and I would like to refresh on the tab selected tab instead refresh on every tab. Is there any way to refresh the selected tab instead of refreshing all tab using Syncfusion ej2?
if (args.item.text == "Refresh") {
//location.reload();
var obj = document.getElementById('appTab').ej2_instances[0];
console.log(obj);
obj.refresh(); //refresh all tabs

With latest version of syncfusion package(18.3.51), you can use the public method refreshActiveTab to refresh the selected tab alone. Please refer the following sample.
https://stackblitz.com/edit/refresh-active-tab?file=index.ts

Related

How to reload a particular tab in bottom navigation bar flutter?

I have a bottom navigation bar with 5 tabs, In each tab I have a button that navigates to another separate screen using Navigation.pushNamed()(page 2); and from (page 2) I pop the screen, now the tab from where I navigated from need to be reloaded. because i store some data (page 2) and stored in sqflite i need to display the data in one of the tabs. Is it possible to reload a particular tab of a bottom navigation bar?
I tried using Navigator.pop(context,true) that also didnt work. Can some one help me with this, thanks in advance.
this is done by the provider. I'm new to flutter as well but this guy explained it very well!
Flutter by default does not save state (and disposes the widgets). If you want to save the state of a tab, you can use a PageStorageBucket. It is really well described in this tutorial:
https://medium.com/#lucassaltoncardinali/keeping-state-with-the-bottom-navigation-bar-in-flutter-69e4168878e1

How do I navigate from a tab page to another tab page?

What is the best way to navigate from a tab page 1 to another tab page 2?
The scenario is that I when I press a button in a tab page, it should navigate to another tab page. I can't set the main tab page's selected tab property because I'm in the tab page 1 viewmodel.
Here is my code, this isn't working but is what I intend to do.
NavigationService.NavigateAsync($"{KnownNavigationParameters.SelectedTab}=TabPage2");
The working code is this, but the problem is that it reloads everything since it navigates to another instance of the MainTabbedPage then selects the TabPage2 tab.
NavigationService.NavigateAsync($"MainTabbedPage?{KnownNavigationParameters.SelectedTab}=TabPage2");
If you want to navigate to tab use the following code, I am using this for navigating from a drawer and it works fine hope it will work for you.
var navParams = new NavigationParameters
{
{ "Title", "Page Title" }
};
NavigationService.NavigateAsync("NavigationPage/{Tab Parent Page}/" + {Tab Page}, navParams );

How do I navigate to a different route on a button click in Kendo MVVM

I want to navigate to a route when the user clicks a 'next' button, using Kendo MVVM, to display a view. The route will display the next page of a single page application using:
myRouter.route("/AppDetails", function () {
layoutView.showIn("#content", appDetailsView);
}
)
According to documentation: http://docs.telerik.com/kendo-ui/framework/spa/router#navigation. This code:
myRouter.navigate("/AppDetails");
should do this. Isn't it working?

how reset all contents of page without reloading page in GWT

I have tabpanel in my application. i just want to refresh all the contents of the tab whenever i navigate through different tabs. Currently i am using Window.Location.Reload for the same. But is there any other way out for the same?
Add a TabListener to the TabPanel using the method addTabListener(TabListener listener). You will be notified when a tab is selected. You can put your logic of refresh in that method.

Ajax Control Toolkit - Use client-side button to activate tab

I'm using the TabContainer/TabPanel components of the Ajax Control Toolkit.
I'd like to hide the tabs themselves and use a button elsewhere on the page to activate (bring to the front) one of the tabs without posting back to the server.
I can show and hide the tabs by grabbing their clientIDs and manually setting the visibility and display styles.
But is there a javascript function I can call to do this and perform whatever magic happens behind the scenes when I click an actual tab?
Example:
var tab = $find(“tabContainer’s ClientID”);
tab.set_activeTabIndex(1); // active the second tab panel
tab.getFirstTab().set_enabled(false); // disable the first panel