FIlter Carousel by button Click

6 posts, 0 answers
  1. Rick Mueller
    Rick Mueller avatar
    103 posts
    Member since:
    Feb 2010

    Posted 01 Nov 2010 Link to this post

    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
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 04 Nov 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rick Mueller
    Rick Mueller avatar
    103 posts
    Member since:
    Feb 2010

    Posted 08 Nov 2010 Link to this post

    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

  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 11 Nov 2010 Link to this post

    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
  6. Rick Mueller
    Rick Mueller avatar
    103 posts
    Member since:
    Feb 2010

    Posted 11 Nov 2010 Link to this post

    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
  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 17 Nov 2010 Link to this post

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