Exemple #1
0
        private void Add(DataGrid grid)
        {
            var newItem = new RobaViewModel();

            Robas.Add(newItem);

            int idx;

            for (idx = 0; idx < grid.Items.Count; idx++)
            {
                if (newItem == grid.Items[idx])
                {
                    break;
                }
            }

            grid.SelectionUnit = DataGridSelectionUnit.Cell;
            grid.Focus();
            grid.CurrentCell = new DataGridCellInfo(grid.Items[idx], grid.Columns[0]);
            grid.BeginEdit();
            grid.SelectionUnit = DataGridSelectionUnit.FullRow;
        }
Exemple #2
0
 private void OpenNewRobaWindow()
 {
     NewRoba = new RobaViewModel(_dal);
     NewRobaWindow.ShowSingleWindow();
 }