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

FIlter Carousel by button Click

5 Answers 82 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Rick Mueller
Top achievements
Rank 1
Rick Mueller asked on 01 Nov 2010, 09:54 PM
Hello Telerik,

I have a Carousel populated with all employees from xml database,using xmldataprovider etc.
It's group by Employee Title(manager, Production etc). I also have a listbox with RadRadioButtons popluating all the Employee Titles.

I want to be able to click on a RadRadiobutton and whatever the name of that radiobutton the Carsousel will filter just to that work group.

Any help would be great

Regards,
Rick

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 04 Nov 2010, 04:46 PM
Hello Rick Mueller,

Once you select the particular work-group, you may set the ItemsSource of the carousel to that dataset. You may take a look at this forum thread that deals with a similar case but working with a set of selected items from RadGridView.
 

Greetings,
Maya
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
Rick Mueller
Top achievements
Rank 1
answered on 08 Nov 2010, 06:35 PM
Hello,
Maya

I changed the test data from xml to to collection(observerableCollection)

I'm able to populate the carsousel with the data , I need to filter the carsousel by Button.Tag(Name)

public partial class EmployeCarsouel : UserControl
    {
        public EmployeCarsouel()
        {
            this.InitializeComponent();
            object EmployeeList = this.Resources["EmployeeList"];
             ICollectionView collectionView = CollectionViewSource.GetDefaultView(EmployeeList);
        collectionView.Filter = new Predicate<object>(FilterWG);
  
        }
  
   
  
  
      
        bool FilterWG(object obj)
         {
  
             if (obj as EmployeeModel != null
                 && (obj as EmployeeModel).WorkGroup == This.Button.Tag)
             { return true; } return false;
         }}
        }

Please review

Kinda Lost(really Lost)
Rick

0
Maya
Telerik team
answered on 11 Nov 2010, 10:27 AM
Hi Rick Mueller,

You may take a look at the other forum thread you have started on the same topic. 

Greetings,
Maya
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
Rick Mueller
Top achievements
Rank 1
answered on 11 Nov 2010, 04:28 PM
maya,
thank you for your response,

I can't figure it out, I'm still getting my feet wet with C# and wpf

THank you for your effort

Rick
0
Maya
Telerik team
answered on 17 Nov 2010, 09:53 AM
Hi Rick Mueller,

I am sending you a sample project illustrating how to follow up the idea of my colleague with using the Where() clause. Once you get the filtered source, you can set it as the ItemsSource of the RadCarousel. 

Best wishes,
Maya
the Telerik team
See What's New in RadControls for WPF in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
Tags
Carousel
Asked by
Rick Mueller
Top achievements
Rank 1
Answers by
Maya
Telerik team
Rick Mueller
Top achievements
Rank 1
Share this question
or