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

RadGallery radio button group behavior

1 Answer 100 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Evgeny
Top achievements
Rank 1
Evgeny asked on 12 Apr 2011, 02:11 PM
Hello,

I have a RadGallery control with a few items in it.

I want my items to behave like radio buttons from a single group.
 
Currently if I'm selecting one item and then another, the other one gets unselected, which I like.
However, if I'm selecting one item and then clicking on it again, it gets unselected,  similar to checkbox behavior, which I don't like.

In all of your examples, including ones from previous versions, a click on an item that has already been selected, gets ignored, which is the behavior that I want, for example:

<telerik:RadGallery ViewportWidth="157" ViewportHeight="184" ItemWidth="156"
        ItemHeight="26">
    <telerik:RadGalleryItem Image="{Binding Underline1}"
            ToolTipService.ToolTip="Underline" />
    <telerik:RadGalleryItem Image="{Binding Underline2}"
            ToolTipService.ToolTip="Double underline" />
    <telerik:RadGalleryItem Image="{Binding Underline3}"
            ToolTipService.ToolTip="Thick underline" />
    <telerik:RadGalleryItem Image="{Binding Underline4}"
            ToolTipService.ToolTip="Dotted underline" />
    <telerik:RadGalleryItem Image="{Binding Underline5}"
            ToolTipService.ToolTip="Dashed underline" />
    <telerik:RadGalleryItem Image="{Binding Underline6}"
            ToolTipService.ToolTip="Dot-dash underline" />
    <telerik:RadGalleryItem Image="{Binding Underline7}"
            ToolTipService.ToolTip="Dot-dot-dash underline" />
    <telerik:RadGalleryItem Image="{Binding Underline8}"
            ToolTipService.ToolTip="Wave underline" />
</telerik:RadGallery>

The difference between your code and mine is that you're populating your gallery with RadGalleryItems and I'm populating it using ItemsSource and ItemTemplate, My ItemTemplate is similar to this:
<DataTemplate>
    <StackPanel>
        <Image Source="{Binding Image}" />
        <TextBlock Text ="{Binding Text}" />
    </StackPanel>
</DataTemplate>

Also this doesn't have the desired behavior:
<telerik:RadGallery ViewportWidth="157" ViewportHeight="184" ItemWidth="156"
        ItemHeight="26">
    <TextBlock Text="16253765" />
    <TextBlock Text="16253765" />
    <TextBlock Text="16253765" />
    <TextBlock Text="16253765" />
    <TextBlock Text="16253765" />
</telerik:RadGallery>
It seems that it only works with items that are inside RadGalleryItem, but I thought that it should happen implicitly.

Hope that someone can help.

Thanks,
Evgeny

1 Answer, 1 is accepted

Sort by
0
Accepted
Petar Mladenov
Telerik team
answered on 15 Apr 2011, 03:19 PM
Hello Evgeny,

This is a bug in the RadRibbonBar indeed. We logged it in our PITS(RibbonBar: When Gallery is bound or filled with non-RadgalleryItems, clicking on a selected item deselects it which is wrong) where you will be soon able to vote for. Thank you for your cooperation. We also updated your telerik account points. 

Greetings,
Petar Mladenov
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
Tags
Buttons
Asked by
Evgeny
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or