Example #1
0
        protected void OnDuplicateGridRowCommand()
        {
            if (m_SelectedGridRow == null)
            {
                Debug.Assert(false);
                return;
            }

            DataGridRowViewModel vm = new DataGridRowViewModel();

            vm.Copy(m_SelectedGridRow);
            m_GridRowCollection.Add(vm);
        }
Example #2
0
        protected void OnAddGridRowCommand()
        {
            DataGridRowViewModel vm = new DataGridRowViewModel();

            vm.NewRow = true;
            if (m_SelectedGridRow != null)
            {
                int i = m_GridRowCollection.IndexOf(m_SelectedGridRow);
                m_GridRowCollection.Insert(i + 1, vm);
            }
            else
            {
                m_GridRowCollection.Add(vm);
            }
        }
Example #3
0
 public void Copy(DataGridRowViewModel vm)
 {
     this.FirstColumn  = vm.FirstColumn;
     this.SecondColumn = vm.SecondColumn;
     this.ThirdColumn  = vm.ThirdColumn;
 }