This is a migrated thread and some comments may be shown as answers.

Focus on last items - no matter the selected item

5 Answers 81 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
RoxanaC
Top achievements
Rank 1
RoxanaC asked on 06 Jan 2010, 08:24 AM
Hello!
If I have a RadComboBox, with  more than 20 items this thing becomes a bit confusing.
My example:

Window1.xaml.cs:

public partial class Window1 : Window {
public Window1() {
            InitializeComponent();
            InitializeCombobox();
        }
        private void InitializeCombobox() {
            cbPrimaryData.Items.Clear();
            IList<String> dataItems = new List<string>();

            for (int i = 0; i < 50; i++) {
                dataItems.Add( "Item " + i );
            }
            cbPrimaryData.DataContext = dataItems;
        }
}

in Window1.xaml:

<Grid>
        <telerik:RadComboBox Grid.Row="1"
                             Grid.Column="1"
                             Grid.ColumnSpan="2"
                             Height="20"
                             Name="cbPrimaryData"
                             VerticalAlignment="Center"
                             ItemsSource="{Binding}"
                             Margin="2" />
    </Grid>

If I select the item at index 0 everything works fine when I try to open again the combo box the focus is at the beginning of the items list.
If item at index 1 is selected - at the nest attempt to open the combo box the focus goes to Item 17!
index 2 => focus at index 34
Afterwords the focus is moved at the end of the list.
I think that normal and logic would be that the combo box is focused starting with the selected index, and not at the end of the list.
I don't know if I was very clear in the explanation... just try the small example :)

Regards,
RoxanaC

5 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 06 Jan 2010, 01:03 PM
Hello Roxana,

Thank you for the code snippet. I tried it with the assemblies that will be released the next Friday as internal build (where we already fixed a few problems related to the selection) and I was unable to reproduce the behavior you are describing. Please, let me know if the problem persists in the new assemblies.

Best wishes,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
RoxanaC
Top achievements
Rank 1
answered on 15 Jan 2010, 11:37 AM
I don't know from where to get the latest assemblies since on my account I don't see any link for this (check the attachment pls - the print screen was made on 15.01.2010)

Regards,
Roxana
0
Valeri Hristov
Telerik team
answered on 15 Jan 2010, 02:18 PM
Hi Roxana,

Probably you missed the attachment, but in any case the following page
http://www.telerik.com/account/downloads/product-versions/single-version.aspx?pmvid=2154&pid=0

contains latest official assemblies, that were uploaded earlier today as part of Service Pack 2 of RadControls for Silverlight and WPF. The following page contains the unofficial builds that are released every week:
http://www.telerik.com/account/downloads/internal-builds.aspx?type=1&mvid=2154&pid=601

Regards,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
RoxanaC
Top achievements
Rank 1
answered on 18 Jan 2010, 10:03 AM
It is true that the behavior has changed with the last dlls. But it is kind of unpredictable since if there is one item selected, if you open again the RadComboBox the position of the previously selected item is in the view but never on the same position - sometimes in the middle, sometimes at the end of the partial list that is shown. Try using the wpf classic ComboBox element and you will see that the selected item is always at the beginig of the shown list.

Thank you!
Roxana
0
Valeri Hristov
Telerik team
answered on 19 Jan 2010, 04:01 PM
Hi Roxana,

We are aware of this glitch, it is on the RadComboBox product backlog and it will be fixed some day in the future. However, its priority is relatively low, since it does not break the control functionality.

All the best,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
RoxanaC
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
RoxanaC
Top achievements
Rank 1
Share this question
or