One of the Silverlight demo was syncing between data form and grid - changing one will change the other.
However, I could not get it to work. Did I make a mistake here?
However, I could not get it to work. Did I make a mistake here?
private IEnumerable<
Entity
> _others;
private OthersContext _context;
private void Page_Loaded(object sender, RoutedEventArgs e)
{
_context = new Web.OthersContext();
_context.Load(_context.GetOthersQuery(), LoadCallBack, null);
}
private void LoadCallBack(LoadOperation lo)
{
if (lo.HasError)
{
MessageBox.Show(lo.Error.Message);
}
else
{
_others = lo.Entities;
dataform1.ItemsSource = _others ;
grid1.ItemsSource = _others ;
}
}