Problem with SelectedItem property in RadColorPaletteView control.

2 posts, 0 answers
  1. SivaPrasad Bevara
    SivaPrasad Bevara avatar
    73 posts
    Member since:
    Oct 2012

    Posted 14 Feb 2011 Link to this post


    I am using "RadColorPaletteView" to display custom colors.

    I need to change the application theme, when we select the color from the "RadColorPaletteView".

    I am using the following code in the SelectionChanged event to get the selected color.
    string strColor = ((RadColorPaletteView)e.OriginalSource).SelectedItem.ToString();

    I am able to get the color when I select the color for the first time. If I try to select another color it is returning the ((RadColorPaletteView)e.OriginalSource).SelectedItem as null.

    How can I get the selected color from the "RadColorPaletteView".

    I tried to use the "(((RadColorPaletteView)e.OriginalSource)).SelectedPaletteViewItem.Color". With this I am getting some missing assembly reference error.

    Please help.


  2. Petar Mladenov
    Petar Mladenov avatar
    2991 posts

    Posted 15 Feb 2011 Link to this post

    Hello SivaPrasad Bevara,

    This appears to be a bug in the RadColorPalleteView. We logged it in our PITS(ColorPicker: RadColorPaletteView `s SelectionChanged event fires twice) and updated your telerik points accordingly. You will be soon able vote for this issue ( it will be uploaded in the next 24 hours). As a workaround you can do like so:

    privatevoidPalette_SelectionChanged(objectsender, Telerik.Windows.Controls.SelectionChangedEventArgs e) 
                if(this.palette.SelectedItem != null
                            string strColor = ((RadColorPaletteView)e.OriginalSource).SelectedItem.ToString();

                }            } 

    Please accept our apologies for the inconvenience caused and feel free to ask if you need further help.

    Kind regards,
    Petar Mladenov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top