Exemplo n.º 1
0
 public AddingDataForm(string[] test)
 {
     InitializeComponent();
     DataFromForm = test;
     CreateDataForRows();
     DataGridOperations.DefaultSelectedCell(ref myGridView);
 }
Exemplo n.º 2
0
 private void AddingDataForm_KeyDown(object sender, KeyEventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     if (e.Control && e.KeyCode == Keys.V)
     {
         DataGridOperations.PasteInData(ref myGridView);
     }
     this.Cursor = Cursors.Default;
 }
Exemplo n.º 3
0
        private DataTable TakeDataFromForm()
        {
            dt.Columns.Add(DataGridOperations.AddFirstColumn());
            dt.Rows.Add(DataGridOperations.AddNewRow(ref dt));

            for (int i = 1; i < DataFromForm.Length; i++)
            {
                dt.Columns.Add(new DataColumn(DataFromForm[i], typeof(String)));
            }
            return(dt);
        }
Exemplo n.º 4
0
 private void AddRowsButton_Click(object sender, EventArgs e)
 {
     if (CheckUserInput.IsInputAnumber(noOfAddingRows) == true && CheckUserInput.IsNumberTooLarge(GrabNumberFromInput()) == true)
     {
         int no = GrabNumberFromInput();
         for (int i = 0; i < no; i++)
         {
             dt.Rows.Add(DataGridOperations.AddNewRow(ref dt));
         }
     }
     DataGridOperations.DefaultSelectedCell(ref myGridView);
 }
Exemplo n.º 5
0
 private void PasteData_Click(object sender, EventArgs e)
 {
     DataGridOperations.PasteInData(ref myGridView);
 }