| Author: seema 15 Oct 2009 | Member Level: Gold | Rating:  Points: 2 |
http://www.codeproject.com/KB/WPF/WPFDataGridExamples.aspx http://www.c-sharpcorner.com/UploadFile/mahesh/WpfDGP109272009111405AM/WpfDGP1.aspx
|
| Author: ABitSmart 16 Oct 2009 | Member Level: Diamond | Rating:  Points: 2 |
Since, you are binding to the ItemsSource you need to set the DataContext like this,
dgDefaultGrps.DataContext = ds.Tables[0];
You could also set the ItemsSource directly in code,
dgDefaultGrps.ItemsSource = ds.Tables[0].DefaultView;
Kind regards, ABitSmart DNS Web-master, DNS MVM My blog Thoughts.exe
|