using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace malli { /// /// Interaction logic for MainWindow.xaml /// public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Window_Loaded(object sender, RoutedEventArgs e) { malli.luento20malliDataSet luento20malliDataSet = ((malli.luento20malliDataSet)(this.FindResource("luento20malliDataSet"))); // Load data into the table Aine. You can modify this code as needed. malli.luento20malliDataSetTableAdapters.AineTableAdapter luento20malliDataSetAineTableAdapter = new malli.luento20malliDataSetTableAdapters.AineTableAdapter(); luento20malliDataSetAineTableAdapter.Fill(luento20malliDataSet.Aine); System.Windows.Data.CollectionViewSource aineViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("aineViewSource"))); aineViewSource.View.MoveCurrentToFirst(); // Load data into the table Resepti. You can modify this code as needed. malli.luento20malliDataSetTableAdapters.ReseptiTableAdapter luento20malliDataSetReseptiTableAdapter = new malli.luento20malliDataSetTableAdapters.ReseptiTableAdapter(); luento20malliDataSetReseptiTableAdapter.Fill(luento20malliDataSet.Resepti); System.Windows.Data.CollectionViewSource reseptiViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("reseptiViewSource"))); reseptiViewSource.View.MoveCurrentToFirst(); } } }