Two Way Binding issue

2 posts, 0 answers
  1. Richard Harrigan
    Richard Harrigan avatar
    235 posts
    Member since:
    Nov 2009

    Posted 16 Jul 2013 Link to this post

    Hi,

    A property that was changed in code does not display in the cell it is bound to until the cell is clicked on twice.  The first click outlines the cell and the second click puts the cell into edit mode.  When in edit mode the new value is displayed.  Also, if a row is added the cell value is also displayed. What do I need to do to get the cell to display when the property is set.


    private string columnAlias;
    public string ColumnAlias 
    {
    get { return this.columnAlias; }
            set
            {
            if (columnAlias == value)
                    return;
       
                    this.columnAlias = value;
                    Filter.EditWhereFilter();
                    OnPropertyChanged("ColumnAlias");
    }
    }


     <telerik:GridViewDataColumn
                Width="15*" Name="ColumnAlias" Header="Alias" DataMemberBinding="{Binding ColumnAlias, Mode=TwoWay}">
    </telerik:GridViewDataColumn>


    <telerik:RadGridView
    Name="radGridViewSelectedColumns" Grid.Row="1"
    ItemsSource="{Binding CriteriaColumns,
    Source={StaticResource criteriaColumns}}"  
            telerik:RadDragAndDropManager.AllowDrop="True" 
            SelectionMode="Extended" 
            SelectionChanged="radGridViewSelectedColumns_SelectionChanged"
            ShowGroupPanel="False"
            IsFilteringAllowed="False"
            ShowColumnHeaders="true"
            BorderThickness="0"
            EnableColumnVirtualization="False"
            EnableRowVirtualization="False"
            AutoGenerateColumns="False"
            CanUserFreezeColumns="False"
            CanUserResizeColumns="True"
            CanUserDeleteRows="True"
            Deleted="radGridViewSelectedColumns_Deleted" 
            RowIndicatorVisibility="Visible">
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 19 Jul 2013 Link to this post

    Hello,

    Having your description, it seems that a PropertyChanged event is not raised. I can see that you have such a call in your code, but would you please assure that such a notification is actually raised?

    If the problem still remains, then may I ask you to isolate the issue in a simple demo which we can check locally?
     

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top