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

            Kupcis.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 OpenNewKupciWindow()
 {
     NewKupci = new KupciViewModel(_dal);
     NewKupciWindow.ShowSingleWindow();
 }