Not able to Edit GridViewComboBox

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

    Posted 12 Mar 2012 Link to this post


    I am using RadControls for Silverlight 5.0 (Version: 2012.1.215.1050), and I have issue editing the Combobox in the RadGridView.

    I am using 2 different sources to load the GridView and the Combobox.
    I am able to see the ComboBox, if I didnt set the DataMemberBinding property (for preselecting the item) for the Combobox. Once I set this property, then the combobox becomes like a readonly Textbox. Its preselecting the item, but not able to select the other items.

    Following is the code.

    <StackPanel x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource MyViewModel}}" Orientation="Vertical" Margin="10,10,10,10" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Grid x:Name="gridUploadFile" Width="950" HorizontalAlignment="Left">
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="300"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <ColumnDefinition Width="900"></ColumnDefinition>
                <TextBlock x:Name="lblMessage" Width="400" Height="30" FontWeight="Bold" Foreground="Red" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left"></TextBlock>
                <GVControls:GVDataGrid Name="radCodes" Width="700" Height="250" VerticalAlignment="Top"
                                            ItemsSource="{Binding MyCollection}"
                                            EnableColumnVirtualization="True" HorizontalAlignment="Left" EnableRowVirtualization="True"
                                            AutoExpandGroups="True" Grid.Row="1" Grid.Column="0">
                        <GVControls:GVDataGridComboBoxColumn x:Name="grdCodes" 
                                ItemsSourceBinding="{Binding CodesLookup,Source={StaticResource MyViewModel}}" Header="Code" 
                                UniqueName="Codes" DisplayMemberPath="Name" 
                                DataMemberBinding="{Binding CodeId}" Width="100">
                        <GVControls:GVDataGridTextColumn x:Name="grdCodeId" DataMemberBinding="{Binding CodeId}" Header="Code ID" Width="100"></GVControls:GVDataGridTextColumn>

    Please help.

  2. SivaPrasad Bevara
    SivaPrasad Bevara avatar
    73 posts
    Member since:
    Oct 2012

    Posted 14 Mar 2012 Link to this post

    I got the fix. Its my issue.
    For DataMemberBinding I am using the Key field. This is the reason its becoming like a read only.

Back to Top