Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Context.PropertyChanged fires on one insert only RSS

0 replies

Last post Aug 03, 2009 05:03 AM by samw

(0)
  • samw

    samw

    Member

    164 Points

    282 Posts

    Context.PropertyChanged fires on one insert only

    Aug 03, 2009 05:03 AM | LINK

     I typed up the code on page 55 of the overview document.  I added a button to insert a row.  I noticed two things:

    1.)  Context.PropertyChanged fires on one insert only

    2.) The datagrid does not refresh itself after an insert unless I reset the ItemsSource.  Is that the default behavior?  

    Thanks,

    Sam

     

    private void InsertButton_Click(object sender, RoutedEventArgs e)
            {
                Context.Feedbacks.Add(new Feedback { Date = DateTime.Now });
                //dg.ItemsSource = Context.Feedbacks;
                
            }