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

Binding and Grouping issue

2 Answers 234 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Simplex
Top achievements
Rank 1
Simplex asked on 29 Jun 2009, 10:06 PM
I'm using a MVVM pattern to bind the column to a property on a viewmodel. When I enable grouping the combo boxes will now longer allow change of values. Also, the masked text box loses the text on grouping and sorting. Also on grouping a checkbox, if I give it a unique name it will not let me edit it, but if I don't give it a unique name I can't group on it.

FYI: After grouping then remove the grouping, the combo box property value is called 4 times on first select, then called twice on each change after that. Either case the property defaults back to the orignal value when control was created.

 Is it just me, or ithese real issues?

            <telerik:RadGridView  
                Name="RadGridPhoneList" HorizontalAlignment="Left"  
                IsReadOnly="True" 
                telerik:StyleManager.Theme="Simple"  
                RowIndicatorVisibility="Collapsed" AutoGenerateColumns="False"   
                ColumnsWidthMode="Fill"  
                CanUserFreezeColumns="False" 
                ItemsSource="{Binding Path=PersonPhoneViewModels}" 
            > 
                <telerik:RadGridView.Columns> 
                     
                    <telerik:GridViewDataColumn  
                        HeaderText="Phone Number"  
                        UniqueName ="PhoneNumber" 
                    > 
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <telerik:RadMaskedTextBox 
                                    x:Name="TextBoxNumber"  
                                    Mask="(###) ### - ####"  
                                    Width="100" 
                                    Value="{Binding Path=PhoneNumber, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"             
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 
                     
                    <telerik:GridViewDataColumn  
                        HeaderText="Extension"  
                        DataMemberPath="Extension" 
                        UniqueName ="Extension" 
                    /> 
                     
 
                    <telerik:GridViewComboBoxColumn 
                        HeaderText="Phone Type"  
                        UniqueName ="PhoneType"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <ComboBox  
                                    VerticalAlignment="Center" 
                                    ItemsSource="{Binding Path=PhoneTypeOptions, Mode=OneTime}"  
                                    IsSynchronizedWithCurrentItem="true" 
                                    SelectedItem="{Binding Path=PhoneType}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewComboBoxColumn> 
                     
                     
                    <telerik:GridViewComboBoxColumn 
                        HeaderText="Phone Provider"  
                        UniqueName ="PhoneProviderType"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <ComboBox  
                                    VerticalAlignment="Center" 
                                    ItemsSource="{Binding Path=PhoneProviderOptions, Mode=OneTime}"  
                                    IsSynchronizedWithCurrentItem="true" 
                                    SelectedItem="{Binding Path=PhoneProviderType}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewComboBoxColumn> 
                                        
            <!-- allows gouping, but not edit --> 
                    <telerik:GridViewDataColumn  
                        HeaderText="Is Default"  
                        UniqueName="IsDefault"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <CheckBox  
                                    VerticalAlignment="Center" 
                                    IsChecked="{Binding Path=IsDefault}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 
                     
            <!-- does not allows gouping, but can edit --> 
                    <telerik:GridViewDataColumn  
                        HeaderText="Is Default"
                        <telerik:GridViewColumn.CellTemplate> 
                            <DataTemplate> 
                                <CheckBox  
                                    VerticalAlignment="Center" 
                                    IsChecked="{Binding Path=IsDefault}" 
                                /> 
                            </DataTemplate> 
                        </telerik:GridViewColumn.CellTemplate> 
                    </telerik:GridViewDataColumn> 
                     
                    <telerik:GridViewDataColumn  
                        HeaderText="Note"  
                        IsCustomSortingEnabled="True"  
                        IsFilterable="True"  
                        DataMemberPath="Note">                         
                    </telerik:GridViewDataColumn> 
                     
                </telerik:RadGridView.Columns> 
 
            </telerik:RadGridView> 
 




2 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 03 Jul 2009, 11:33 AM

Hi Edward,

Please excuse me for the late answer. We are a bit short of resources these days as we are preparing the launch of the Q2 release.
Now on the point - I was trying to resemble the problem here but with no success so far .  It would be very helpful if I could have a glimpse on your MVVM implementation . I can see that you have opened a support ticket on the same issue. Can you please attach to the ticket  the .cs of your MVVM or ideally the whole project ( if convenient) .  I'll gladly try to debug it and find a solution. 

Greetings,

Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Pavel Pavlov
Telerik team
answered on 03 Jul 2009, 11:33 AM

Hi Edward,

Please excuse me for the late answer. We are a bit short of resources these days as we are preparing the launch of the Q2 release.
Now on the point - I was trying to resemble the problem here but with no success so far .  It would be very helpful if I could have a glimpse on your MVVM implementation . I can see that you have opened a support ticket on the same issue. Can you please attach to the ticket  the .cs of your MVVM or ideally the whole project ( if convenient) .  I'll gladly try to debug it and find a solution. 

Greetings,

Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Simplex
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or