|
Rank: Member Groups: Member
Joined: 2/15/2010 Posts: 25
|
I have a multi-level tab strip with a top group and then a sub-group under each tab.. When clicking on the top-level tab I want it to default to a specific sub-group selection. i'm doing all this through javascript.. but the "setChecked" method doesn't seem to be working. I'm assuming this is where I can set one of these items to be selected/highlighted. But it doesn't seem to work.
This seems like a lot of code just to check off a sub-group item on a top-level tab, but what is the right way to do this, because I feel like I've tried everything. Any help would be appreciated.
multiPage.selectPageById("pv_LocTypes"); tabItem = tabStrip.findItem("ti_locations"); var subGroup = tabItem.getSubGroup(); var selectItem = subGroup.getItemById("ti_types") selectItem.setChecked();
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Try setSelected instead of setChecked. I don't think setChecked does anything on tab strip. That function is mainly for menu to place a check mark in front of the menu item.
Thanks
|
|
Rank: Member Groups: Member
Joined: 2/15/2010 Posts: 25
|
.setSelected(true) did the trick - thanks
I've almost got this thing working just how I need it. When the page is opened for the first time is there anyway to force a server side event from javascript that will hit the tabstrip onItemClick event with the sub-group menu that I have selected from that .setSelected(true)?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
There are. But for a server event to happen, the page must to be posted back to the server. This usually means the whole page is reloaded again, thus whatever you did prior to the post back with JavaScript are completely abandoned.
If you still want to go ahead, you can call the tab item's click method (make sure you have the TabStrip's RaisesServerEvent set to true).
If you do not want the page to be reloaded, you need do it through AJAX. That is a totally different topic though. There should be plenty of materials about ASP.NET AJAX online.
Thanks
|
|