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

RadJumpList - no SelectedIndex

3 Answers 84 Views
JumpList
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Heather
Top achievements
Rank 1
Heather asked on 05 Oct 2011, 06:43 PM
I have recently converted a ListBox control which is bound to MVVM data into a RadJumpList. To my surprise there is no SelectedIndex property associated with the RadJumpBox control. I am leveraging the item index in a navigation query to a second page in order to return a detail view of the selected item. With no SelectedIndex property for this JumpList how can I capture the selected item information?

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 06 Oct 2011, 08:08 AM
Hello Heather,

Thanks for writing and for your question.

There is a SelectedItem property which returns the business object from the source collection that is currently selected. You can use this property to obtain information about the current selection in RadDataBoundListBox/RadJumpList.

Let me know if you need further assistance with this.

Greetings,
Deyan
the Telerik team

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

0
Heather
Top achievements
Rank 1
answered on 06 Oct 2011, 02:02 PM
I resolved this by leveraging the following

// Handle selection changed on ListBox
private void MainListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    if (MainListBox.SelectedItem != null)
    {
        var selectedIndex = (MainListBox.SelectedItem as ItemViewModel).LineSix;
 
        // Navigate to the new page
        NavigationService.Navigate(new Uri("/DetailsPage.xaml?selectedItem=" + selectedIndex, UriKind.Relative));
    }
}
0
Deyan
Telerik team
answered on 06 Oct 2011, 05:26 PM
Hi Heather,

Yes, this is the right approach when using the SelectedItem property.

Let me know if you need further assistance with this.

All the best,
Deyan
the Telerik team

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

Tags
JumpList
Asked by
Heather
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Heather
Top achievements
Rank 1
Share this question
or