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

Syncing DataForm and Grid

1 Answer 33 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 12 Apr 2011, 05:55 PM
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?

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 ;
     }
 }

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Apr 2011, 07:06 AM
Hello,

 You need to use ICollectionView (check the demo title, description, code, etc.) to achieve your goal. 

Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DataForm
Asked by
Edward
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or