Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
124
Has the EditorTemplate changed between version 2010.1 and 2011.1?
posted

Hi,

We have a grids that have dropdowns that used to work fine but now we have upgraded they are breaking.

When you select the cell, the combobox is displayed and you can break on the property to see that it does correctly set the data when focus is lost.

InfragisticsSL4.Controls.Grids.XamGrid.v11.1!

Infragistics.Controls.Grids.CellControl
.EvaluateEditingBindings() + 0x107 bytes
The problem is there appears to be an extra call coming from > InfragisticsSL4.Controls.Grids.XamGrid.v11.1!
Infragistics.Controls.Grids.Primitives.TemplateColumnContentProvider
.EditorRemoved() + 0x30 bytes

This has the value of null, which is not valid.

Any suggestions?
[Sample code]
public string PersonId { get; set; }
public Person SelectedPerson
        {
   get { return People.First(x => x.Id == PersonId); }
            set
            {
                if (PersonId != value.Id) // Pop on "second" call
                {
                    PersonId = value.Id;
                    NotifyPropertyChanged();
                }
            }
        }
                                <i:TemplateColumn 
                                    Key="SelectedPerson"
                                    HeaderText="Person">
                                    <i:TemplateColumn.ItemTemplate>
                                        <DataTemplate>
                                            <TextBlock Text="{Binding Person.Name, Mode=OneWay, Converter={StaticResource EnumConverter}}" />
                                        </DataTemplate>
                                    </i:TemplateColumn.ItemTemplate>
                                    <i:TemplateColumn.EditorTemplate>
                                        <DataTemplate>
                                            <Grid>
                                                <ComboBox 
                                                    Style="{StaticResource Styles.ComboBox}"
                                                    ItemsSource="{Binding People}"
                                                    SelectedItem="{Binding SelectedPerson, Mode=TwoWay}" >
                                                    <ComboBox.ItemTemplate>
                                                        <DataTemplate>
                                                            <StackPanel Orientation="Horizontal">
                                                                <TextBlock Text="{Binding Name, Mode=OneWay, Converter={StaticResource EnumConverter}}" />
                                                            </StackPanel>
                                                        </DataTemplate>
                                                    </ComboBox.ItemTemplate>
                                                </ComboBox>
                                            </Grid>
                                        </DataTemplate>
                                    </i:TemplateColumn.EditorTemplate>
                                </i:TemplateColumn>
Parents
No Data
Reply
  • 138253
    Offline posted

    Hello,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post, but it seems like am missing something about your scenario, so if this is still an issue for you, could you please send me an isolated sample project, where this is reproduced, so I can investigate it further for you.

     

    Feel free to write me if you have further questions.

Children
No Data