Focus on last items - no matter the selected item

6 posts, 0 answers
  1. RoxanaC
    RoxanaC avatar
    71 posts
    Member since:
    Dec 2009

    Posted 06 Jan 2010 Link to this post

    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
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 06 Jan 2010 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. RoxanaC
    RoxanaC avatar
    71 posts
    Member since:
    Dec 2009

    Posted 15 Jan 2010 Link to this post

    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
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 15 Jan 2010 Link to this post

    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.
  6. RoxanaC
    RoxanaC avatar
    71 posts
    Member since:
    Dec 2009

    Posted 18 Jan 2010 Link to this post

    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
  7. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 19 Jan 2010 Link to this post

    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.
Back to Top
UI for WPF is Visual Studio 2017 Ready