This is a migrated thread and some comments may be shown as answers.
Active Tab on Close.
7 Answers 96 Views
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Dev asked on 14 Jun 2012, 07:27 PM
Does the Rad Dock keep a history of the order in which the tabs become active? If I open "Tab1", then Open "Tab2", then open "Tab3", if I then close "Tab 3" I would expect "Tab 2" to become the active tab or the tab closest to the position of the tab that was closed. Instead, when ever I close any tab the first tab in the control always becomes the active tab.

Another useful feature would be the ability to drag the tabs around to re-order the tabs like you can in Visual Studio 2010.

7 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 1
answered on 18 Jun 2012, 09:16 PM
I second both!
0
Georgi
Telerik team
answered on 19 Jun 2012, 12:49 PM
Hello,

We have both issues logged in our Public Issue Tracking System. You can vote and track the progress of implementing them here and here. We have scheduled the reordering of the tabs for the Q3 2012 and the PITS item will be updated in the next few days.

All the best,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Scott
Top achievements
Rank 1
answered on 09 Nov 2012, 01:54 PM
This is a big issue for us. The feedback from our users rate this issue as 'annoying'. I put the issue on hold here but will be forced to resolve it before our next release.

Everybody reading this, please go here and vote it up. This issue is tracked under Silverlight; hopefully the fix will carry through to the WPF implementation.

By the way, that issue should be tracked as a usability bug and not a new feature request.
0
Miroslav Nedyalkov
Telerik team
answered on 14 Nov 2012, 12:15 PM
Hi Scott,

We will try to include the fix of the issue for the 2013 Q1 or later after it. Hope this time frame is OK for you.

All the best,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Dev
Top achievements
Rank 1
answered on 03 Dec 2012, 06:35 PM
I finally got tired of waiting for a solution so I came up with my own in about 15 minutes. I don't know what is taking Telerik so long. mainDocking is the name of my RadDocking control and I am using the PreviewClose event. It may not be the most elegant and it doesn't keep track of tab order history but at least it goes to the closest tab instead of the first tab every time.


void mainDocking_PreviewClose(object sender, StateChangeEventArgs e)
{
     //only do tab ordering if closing one tab
     if (e.Panes.Count() == 1)
     {
          //get the tab that is closing
          RadPane closingPane = e.Panes.First();
          //ignore closing pane if closing pane is floating or if closing pane is not the active pane
          if (!closingPane.IsFloating && closingPane == mainDocking.ActivePane)
          {
               bool paneFound = false; //used to determine if the pane that is being closed has been located
               RadPane newPane = null; //this will be the new active pane
 
               //go through each pane in the dock to determine the next active pane.
               foreach (RadPane p in mainDocking.Panes)
               {
                    //if the current is not floating and current pane is not closing pane the set current pane to next active pane.
                    if (!p.IsFloating && p != closingPane)
                    {
                         newPane = p;
                    }
                    //if current pane is closing pane the set paneFound variable to true.
                    if (p == closingPane)
                    {
                        paneFound = true;
                    }
                    //if we have a new pane selected and we have located the closing pane break loop
                    if (newPane != null && paneFound)
                    {
                        break;
                    }
               }
               //if we have found the next active pane set it to the active pane
               if (newPane != null)
               {
                    mainDocking.ActivePane = newPane;
               }
          }
     }
}
0
Scott
Top achievements
Rank 1
answered on 13 Dec 2012, 09:40 PM
A Q1 update would make our initial code freeze date. Putting a Q2 update into our code would have to be evaluated at that time.

This would make a much better product and would be appreciated by those of us that have posted regarding this issue.

Thanks for the upate.
0
Scott
Top achievements
Rank 1
answered on 14 Dec 2012, 03:31 PM
Using your example as inspiration, I created a more generic way of handling panes. It looks to see if there is a pane in the containing pane group preceeding the one being closed and, if so, activates it. This seems to handle the more complex docking scenarious (e.g., panes in floating windows) although it has not been rigorously tested. Better than just opening the first tab, but not as good as opening the last accessed tab in the group.
// only do tab ordering if closing one tab
if (e.Panes.Count() == 1)
{
    RadPane closingPane = e.Panes.First();
    if (closingPane == _radDocking.ActivePane)
    {
        // find and activate the pane preceeding the one in the group that is closing
        RadPaneGroup paneGroup = closingPane.PaneGroup;
        for (int paneIndex = 1; paneIndex < paneGroup.Items.Count; ++paneIndex)
        {
            if (paneGroup.Items[paneIndex] == closingPane)
            {
                _radDocking.ActivePane = (RadPane)paneGroup.Items[paneIndex - 1];
                break;
            }
        }
    }
}
Asked by
Dev
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Georgi
Telerik team
Scott
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Dev
Top achievements
Rank 1
Share this question
or