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

GridViewComboBoxColumn strange trouble

2 Answers 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 04 Jul 2012, 02:46 PM
Hi, we have very strange GridViewComboBoxColumn's behaviour. Code is very simple, but we have different result when execute our program on different PC. Normal behaviour should be next:
1) select any item in 3rd row combobox;
2) choose second cell in this row.
3) selected item in 1st column should be selected!!!

But on 50% PC we don't have this, i.e. selected item pull down everywhere. We lose selected item on LostFocus. In debug mode we saw, that debugger comes to GET of Employee.Name property after ComboBox selection changed (on the PC with wrong behaviour). And debugger comes to SET of this property on the PC with normal behaviour. It's hard to believe and to explain. What's wrong with this control?

BUT !!! We don't have any trouble if use common template with ComboBox (i.e. without using GridViewComboBoxColumn) - ex.code3.

Ex.code1: Main Window XAML:
<telerik:RadGridView Name="dGrid" AutoGenerateColumns="False" Height="188" VerticalAlignment="Top">
    <telerik:RadGridView.Columns>
        <telerik:GridViewComboBoxColumn
            ItemsSourceBinding ="{Binding Path=Names, Mode=TwoWay}"
            DataMemberBinding="{Binding Path=Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
            UniqueName="ClmNames"
            >
        </telerik:GridViewComboBoxColumn>
        <telerik:GridViewDataColumn
            DataMemberBinding="{Binding Path=Name, Mode=TwoWay}">
        </telerik:GridViewDataColumn>
    </telerik:RadGridView.Columns>

Ex.code2: Main window C#:
public MainWindow()
{
    InitializeComponent();
 
    _employees = new List<Employee>(){
                 new Employee {Names = new List<string>{"Ann", "Nata"}, Name = "Ann"},
                 new Employee {Names = new List<string>{"Elise", "Ivan", "Марк"}, Name = "Ivan"},
                 new Employee {Names = new List<string>{"Elise", "Ivan", "Марк"}},
    };
 
    dGrid.ItemsSource = _employees;
}

Ex.code3: Working template XAML:
<telerik:GridViewDataColumn.CellTemplate><br>
      <DataTemplate><br>
       <ComboBox ItemsSource="{Binding Path=ImprovementList}" DisplayMemberPath="refimprovement.name_full"<br>
           SelectedItem="{Binding Path=RecalcManualItem.cfaccimprovementlist, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"<br>
           SelectionChanged="ComboBox_SelectionChanged" /><br>
      </DataTemplate><br>
     </telerik:GridViewDataColumn.CellTemplate>

2 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 05 Jul 2012, 11:32 AM
Hi Peter,

I've tried to reproduce the wrong behavior but I was not able to. Can you check the attached test project? Is there something specific on your side that I've missed? Also, more information about the machines where the wrong behavior is observed would be helpful.

All the best,
Yordanka
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Peter
Top achievements
Rank 1
answered on 09 Jul 2012, 12:06 PM
Hi Yordanka, good for you
may be we have located problem. Strange behaviour appeare on machine with installed .NET Framework 4.5 RC. Certainly, it is inadmissible. We need you repair this bug.

With best regards,
Barbanyaga Peter.
Tags
GridView
Asked by
Peter
Top achievements
Rank 1
Answers by
Yordanka
Telerik team
Peter
Top achievements
Rank 1
Share this question
or