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

RadPanelBarItem isn't deselected

7 Answers 100 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
m v klingeren
Top achievements
Rank 1
m v klingeren asked on 28 Jun 2010, 12:04 PM
 Im selecting the child item of my RadBarPaneltem (level 1), using

private void SelectFirstRadBarItemChild(object sender, RadRoutedEventArgs e) 
        { 
            RadPanelBarItem rbItem = (RadPanelBarItem)sender; 
 
            if (rbItem.Level == 1) 
            { 
 
                RadPanelBarItem rbItemChild = (RadPanelBarItem)rbItem.Items[0]; 
                rbItemChild.IsSelected = true
            } 
        } 

i attached this to the Expanded event of my RadPanelBarItem's (on level 1)

<telerikNavigation:RadPanelBarItem Header="First Item" Expanded="SelectFirstRadBarItemChild">

this does work, but when i select another level 2 item under the same RadPanelBarItem, the programmatically selected item
doesnt get deselected.

How do i make sure other items under the Level1 item get deselected first?

7 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 01 Jul 2010, 02:20 PM
Hello m v klingeren,

I couldn't reproduce the issue you described. However, I am not sure how do you declare the RadPanelBar items. So I prepared a sample project. Can you please take a look at it and let me know if it works for you and if it illustrates your scenario correctly. If it doesn't can you please modify it accordingly so that we can further investigate the issue?

Thank you in advance.

Sincerely yours,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
m v klingeren
Top achievements
Rank 1
answered on 02 Jul 2010, 10:09 AM
You example works partly, problem is that if you now use the Selected /or MouseLeftButtonUp) events of the childs (ie <telerikNavigation:RadPanelBarItem Header="Content1.1"/>)

the first item stays selected.

What can i do about this?

-edit: you're example is a bit disappointing, since its working exactly the same way as my given example..

i need some backup Telerik!!
0
m v klingeren
Top achievements
Rank 1
answered on 07 Jul 2010, 08:41 AM
Telerik home?
0
Kiril Stanoev
Telerik team
answered on 07 Jul 2010, 09:50 AM
Hi m v klingeren,

Sorry for the delayed reply. What exactly do you mean by saying:

if you now use the Selected /or MouseLeftButtonUp) events of the childs (ie <telerikNavigation:RadPanelBarItem Header="Content1.1"/>)

I ran Tina's project and the PanelBar behaved as expected. I've attached a video demonstrating my interaction with the PanelBar. On expand, the first sub-item gets selected. After that I am able to successfully select another item and deselect the programatically selected item.

Is it something else you have on your end. I'd be glad if can attach a sample project reproducing the issue. This way we will be better able to assist you.

On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverlight applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx

Kind regards,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
m v klingeren
Top achievements
Rank 1
answered on 07 Jul 2010, 10:22 AM
I ported your project to Visual Studio 2008, see attached project

in VS2010 it works, in 2008 it doesnt!!


example project: http://www.intersoftware.nl/documenten/examplefortelerik.zip
0
Kiril Stanoev
Telerik team
answered on 12 Jul 2010, 09:49 AM
Hello m v klingeren,

It appears the issue is caused by the way Silverlight 3 and 4 work. If you add a dispatcher in the RadPanelBarItem_Expanded event handler everything should be working properly.

private void RadPanelBarItem_Expanded(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    Dispatcher.BeginInvoke(() =>
    {
        RadPanelBarItem rbItem = (RadPanelBarItem)sender;
 
        if (rbItem.Level == 1)
        {
            RadPanelBarItem rbItemChild = (RadPanelBarItem)rbItem.Items[0];
            rbItemChild.IsSelected = true;
        }
    });
}

Give it a try and let me know how it works.

All the best,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
m v klingeren
Top achievements
Rank 1
answered on 13 Jul 2010, 01:27 PM
Fantastic, thumbs up for telerik!
Tags
PanelBar
Asked by
m v klingeren
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
m v klingeren
Top achievements
Rank 1
Kiril Stanoev
Telerik team
Share this question
or