GridViewComboBoxColumn not selecting previously saved value

2 posts, 0 answers
  1. spam
    spam avatar
    10 posts
    Member since:
    Dec 2010

    Posted 29 Jul 2013 Link to this post

    I have a grid w/ a combobox in the first column. If I exclude SelectedValueMemberPath="ID", the default value doesn't get chosen when I load up the grid BUT the comboBOx is populated. If I include SelectedValueMemberPath="ID" in the xaml, the same thing happens except after a i select a value in the column, if i click on another column, the value in the combobox dissappears & the combobox is blanked. Forcing me to reselect. 

    Can someone please provide an answer to this problem or an example project that has a telerik 
    grid w/ a comobox that allows me to save the combox value and reopen the grid w/ the saved value selected? 

    I've been working on this 5 days now. :(

    Thank you kindly.

    PS: I should also mention, the values in the combobox come from 2 tables & combines. One of them doesn't have IDs so I generate unique interger IDs in C# when the value data is loaded. The value generated are consistent each time & not random.

    <telerikGridView:RadGridView Name="grdSortSequence" IsReadOnly="False"
                                            ItemsSource="{Binding SortSequenceLines, Mode=TwoWay}"
                                            SelectedItem="{Binding SelectedSequenceLine, Mode=TwoWay}"
                                            MinHeight="150" MaxHeight="200"                                    
                                            Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="6" Width="400" Height="160">
                    <telerikGridView:GridViewComboBoxColumn Header="ChangeAttributeTo" UniqueName="AttributeName" Width="120"  ValidatesOnDataErrors="None"                                                   
                                                        DataMemberBinding="{Binding Attribute, Mode=TwoWay}"                                                                                                                                                            
                    <telerikGridView:GridViewDataColumn x:Name="txtAttribute"
                                                        DataMemberBinding="{Binding AttributeName, Mode=TwoWay}"                                                   
                                                        UniqueName="AttributeName" />
                    <telerikGridView:GridViewDataColumn x:Name="txtLength"
                                                        DataMemberBinding="{Binding Length, Mode=TwoWay}"                                                   
                                                        UniqueName="Length" />
                    <telerikGridView:GridViewDataColumn x:Name="chkIsDescending"
                                                        DataMemberBinding="{Binding IsDescending, Mode=TwoWay}"                                                   
                                                        UniqueName="Descending" />
                    <telerikGridView:GridViewDataColumn x:Name="txtSequence"
                                                        DataMemberBinding="{Binding SequenceNumber, Mode=TwoWay}"                                                   
                                                        UniqueName="Name" />

    This is my class that reflex a record in the grid...
    public class SequenceLine
        public GeneralSettings.Module.ViewModels.Attribute Attribute { get; set; }
        public string AttributeName { get; set; }
        public int ClassCodeGroupID { get; set; }
        public int SequenceNumber { get; set; }
        public int Length { get; set; }
        public Boolean? IsDescending { get; set; }

    And this is the Attribute class that is in the comboBox.

    public class Attribute
        public int ID { get; set; }
        public string Name { get; set; }

  2. spam
    spam avatar
    10 posts
    Member since:
    Dec 2010

    Posted 08 Aug 2013 Link to this post

    Can Anyone help me on this? NO comments at all? Really?
Back to Top