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

[Solved] Problem with multiple checkboxes in a WrapPanel, in a Gridview line.

2 Answers 167 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
fred
Top achievements
Rank 1
fred asked on 23 Aug 2010, 03:06 PM
Hello the Telerik Team,

I'm having a difficulty to understand a perticular behavior in a Gridview.

I'm filling a Column with several rows, that include one or several Checkboxes.
I need to use the WrapPanel property to display this in a dashboard.
Fact is, when I have several checkboxes in a row in a line (see my screenshot capture to understand; watch the Coding profile column), I can't select or deselect either of them if the cell is been wrapped.
If the cell doesn't need to be wrapped (see the cell with just two checkboxes in my screenshot) everything works allright.

Is that a bug ? Am I missing something ?

here is my code :
<StormGridView:StormGridViewColumn Header="Coding Profil" DataMemberBinding="{Binding}" Width="*">
                                <StormGridView:StormGridViewColumn.CellEditTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <ListBox ItemsSource="{Binding Path=P59_MEDIA}" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Margin="5" Theme:StyleManager.Style="ListBoxWrapPanel_Style">
                                                <ListBox.ItemsPanel>
                                                    <ItemsPanelTemplate>
                                                        <StormContainers:WrapPanel />
                                                    </ItemsPanelTemplate>
                                                </ListBox.ItemsPanel>
                                                <ListBox.ItemTemplate>
                                                    <DataTemplate>
                                                        <CheckBox Theme:StyleManager.Style="" IsChecked="{Binding Path=P58_IS_SELECTED, Mode=TwoWay}" Margin="8 0 0 0" Content="{Binding Path=P56_NAME_CODING_PROFIL}"></CheckBox>
                                                    </DataTemplate>
                                                </ListBox.ItemTemplate>
                                            </ListBox>
                                            <ListBox ItemsSource="{Binding Path=P64_IMAGE}" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Margin="5" Theme:StyleManager.Style="ListBoxWrapPanel_Style">
                                                <ListBox.ItemsPanel>
                                                    <ItemsPanelTemplate>
                                                        <StormContainers:WrapPanel />
                                                    </ItemsPanelTemplate>
                                                </ListBox.ItemsPanel>
                                                <ListBox.ItemTemplate>
                                                    <DataTemplate>
                                                        <CheckBox Theme:StyleManager.Style="" IsChecked="{Binding Path=P63_IS_SELECTED, Mode=TwoWay}" Margin="8 0 0 0" Content="{Binding Path=P61_NAME_CODING_PROFIL}"></CheckBox>
                                                    </DataTemplate>
                                                </ListBox.ItemTemplate>
                                            </ListBox>
                                        </Grid>
                                    </DataTemplate>                                    
                                </StormGridView:StormGridViewColumn.CellEditTemplate>
                            </StormGridView:StormGridViewColumn>


Regards and thanks in advance
Fred

2 Answers, 1 is accepted

Sort by
0
Accepted
Yavor Georgiev
Telerik team
answered on 26 Aug 2010, 01:42 PM
Hi fred,

 I'm not sure what sort of WrapPanel you're using. I made a project using RadWrapPanel and used it as you use your WrapPanel. I can still toggle the checked state of the checkboxes even when they are wrapped.

Regards,
Yavor Georgiev
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
fred
Top achievements
Rank 1
answered on 31 Aug 2010, 08:00 AM
Thanks for the help !

I found out my errors.
Replacing the CellEditTemplate by a CellTemplate and the <Grid> by a <Stackpanel> for the Listboxes and everything works fine.

Have a nice day.
Tags
GridView
Asked by
fred
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
fred
Top achievements
Rank 1
Share this question
or