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

ComboBox in GridView Column Dissappears

0 Answers 67 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
spam
Top achievements
Rank 1
spam asked on 04 Dec 2012, 09:37 PM
I have a gridview w/ a combobox in the first column. When I run my solution, the grid populates the comboboc & the other two columns.

When I click the 2nd column, the 1st one (with the combo box) dissapears. When I click on the 1st column when it's blank, it reappears.

Can someone tell me why it keeps dissapearing?

--------------------------------------------------------------------------------------------
XAML

        <telerik:RadGridView x:Name="RadGridView1"     
                             ItemsSource="{Binding ccgav}"
                             AutoGenerateColumns="False"
                             ShowInsertRow="True"
                             ShowGroupPanel="False"
                             Visibility="Collapsed"                             
                             Grid.Row="5" 
                             Grid.Column="1"
                             CanUserResizeColumns="False"                                
                             CanUserInsertRows="True"
                             CanUserDeleteRows="True" 
                             HorizontalAlignment="Left"
                             Width="265"
                             MinHeight="125"
                             MaxHeight="125"
                             Height="auto">            
            <telerik:RadGridView.Columns>
<!-- Parent Child Grid-->
                <telerik:GridViewComboBoxColumn Header="Parent"  
                            UniqueName="Parent"
                            ItemsSource="{Binding ParentCombo}"
                            DisplayMemberPath="Value"   
                            SelectedValueMemberPath="ID"   
                            DataMemberBinding="{Binding ParentID, Mode=TwoWay}" />
            
                <telerik:GridViewDataColumn Width="100"
Header="ID"
                                            IsVisible="False"
DataMemberBinding="{Binding ID, Mode=TwoWay}"
IsGroupable="False"
IsFilterable="False" />
                <telerik:GridViewDataColumn Width="100"
Header="Value"                                            
DataMemberBinding="{Binding Value, Mode=TwoWay}"
IsGroupable="False"
IsFilterable="False">
                    <telerikGrid:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding Value,Mode=TwoWay}" MaxLength="20"/>
                        </DataTemplate>
                    </telerikGrid:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>

            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
-------------------
ViewModel

            PopUp.DataContext = new ClassCodeGroupPopUpViewModel()
            {
                Entity = item.Entity,
                ccgav = ConversionHelpers.FromClassCodeGroupAttributeToObservableCollection(gridValues),
                ParentCombo = ConversionHelpers.FromClassCodeGroupAttributeToObservableCollection(comboValues)                 
            }; 

No answers yet. Maybe you can help?

Tags
ComboBox
Asked by
spam
Top achievements
Rank 1
Share this question
or