This question is locked. New answers and comments are not allowed.
I've read most of the posts that relate to the OnSelect Overload and they are helpful.
However overloading the method is a bit overkill for what I'm trying to do.
I have a master detail relationship between a pane on the left and the main view on the right. The menu calender control needs to be able to effect a grid inside the tabstrip view on the right.
I have a varible, say foo that should be set to the current id of the focused grid. But the tabs cache the grids as they are loaded. So foo is only ever set to that last loaded grid.
If I had a sequence of events it might go like this.
foo=null;
click first tab
foo= firstClickedTabGridId
click second tab
foo=secondClickedTabGrid
click first tab
foo still = secondClickedTabGrid
Basically I want Telrik tab strip to act exactly as it does, loading the appropriate content, caching the content and switching on the tab OnSelect method and then let me know that it switched tabs.
pseudo code for the OnSelect overload method might look like this:
function WorkItemTabSelected(e) {
var $item = $(e.item);
var $link = $item.find('.t-link');
var contentUrl = $link.data('ContentUrl');
if (contentUrl) {
//reload the content tab if the contentUrl is available
$.get( contentUrl,
function(data) {
e.contentElement.html(data);
});
}
foo=the name or id of the tab that was clicked that would be really really great.
}
However overloading the method is a bit overkill for what I'm trying to do.
I have a master detail relationship between a pane on the left and the main view on the right. The menu calender control needs to be able to effect a grid inside the tabstrip view on the right.
I have a varible, say foo that should be set to the current id of the focused grid. But the tabs cache the grids as they are loaded. So foo is only ever set to that last loaded grid.
If I had a sequence of events it might go like this.
foo=null;
click first tab
foo= firstClickedTabGridId
click second tab
foo=secondClickedTabGrid
click first tab
foo still = secondClickedTabGrid
Basically I want Telrik tab strip to act exactly as it does, loading the appropriate content, caching the content and switching on the tab OnSelect method and then let me know that it switched tabs.
pseudo code for the OnSelect overload method might look like this:
function WorkItemTabSelected(e) {
var $item = $(e.item);
var $link = $item.find('.t-link');
var contentUrl = $link.data('ContentUrl');
if (contentUrl) {
//reload the content tab if the contentUrl is available
$.get( contentUrl,
function(data) {
e.contentElement.html(data);
});
}
foo=the name or id of the tab that was clicked that would be really really great.
}