Exemplo n.º 1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     WpfSakila.sakilaDataSet sakilaDataSet = ((WpfSakila.sakilaDataSet)(this.FindResource("sakilaDataSet")));
     // Cargar datos en la tabla staff. Puede modificar este código según sea necesario.
     WpfSakila.sakilaDataSetTableAdapters.staffTableAdapter sakilaDataSetstaffTableAdapter = new WpfSakila.sakilaDataSetTableAdapters.staffTableAdapter();
     sakilaDataSetstaffTableAdapter.Fill(sakilaDataSet.staff);
     System.Windows.Data.CollectionViewSource staffViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("staffViewSource")));
     staffViewSource.View.MoveCurrentToFirst();
     // staffDataGrid.SelectedValue = "staff_id";
 }