Exemple #1
0
 private void celdaResultados_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     if (celdaResultados.RowCount > 5)
     {
         celdaResultados.AllowUserToAddRows = false;
     }
 }
 private void drivesList_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     mountDrive.Enabled = true;
     unmountDrive.Enabled = true;
     removeDrive.Enabled = true;
     changePassword.Enabled = true;
 }
Exemple #3
0
 private void dgvProdutosAdicionados_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         calculaPrecos();
     }
 }
Exemple #4
0
 private void dataGridViewSolution_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     if (e.RowIndex > 1)
     {
         if (dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnIP"].Value == null)
         {
             dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnIP"].Value = dataGridViewSolution.Rows[e.RowIndex - 2].Cells["ColumnIP"].Value;
         }
         if (dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnPort"].Value == null)
         {
             dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnPort"].Value = dataGridViewSolution.Rows[e.RowIndex - 2].Cells["ColumnPort"].Value;
         }
         if (dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnLanguage"].Value == null)
         {
             dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnLanguage"].Value = "ENG";
         }
     }
     else if(e.RowIndex == 1)
     {
         if (dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnPort"].Value == null)
         {
             dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnPort"].Value = Config.ServerPort;
         }
         if (dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnLanguage"].Value == null)
         {
             dataGridViewSolution.Rows[e.RowIndex - 1].Cells["ColumnLanguage"].Value = "ENG";
         }
     }
 }
Exemple #5
0
 private void dgvVenda_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     somaValoresColuna.somaValoresColuna(dgvVenda, txtTotalAVista, "pagoAVista");
     somaValoresColuna.somaValoresColuna(dgvVenda, txtTotalCartao, "pagoEmCartao");
     somaValoresColuna.somaValoresColuna(dgvVenda, txtTotalDesconto, "desconto");
     somaValoresColuna.somaValoresColuna(dgvVenda, txtTotalAposDesconto, "totalAposDesconto");
 }
Exemple #6
0
 private void dgvSP_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     foreach (DataGridViewRow rw in dgvSP.Rows)
     {
         rw.Cells[1].Value = String.Format("{0}", rw.Index + 1);
     }
 }
        private void wfEventsGrid_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            for ( int i = e.RowIndex; i < e.RowIndex + e.RowCount; i++ )
             {
            DataGridViewRow row = wfEventsGrid.Rows[i];
            WorkflowTrackingRecord record =
               (WorkflowTrackingRecord)row.DataBoundItem;

            string argsText = "";

            switch ( record.TrackingWorkflowEvent )
            {
            case TrackingWorkflowEvent.Suspended:
               argsText = ((TrackingWorkflowSuspendedEventArgs)record.EventArgs).Error;
               break;
            case TrackingWorkflowEvent.Exception:
               argsText = ((TrackingWorkflowExceptionEventArgs)record.EventArgs).Exception.Message;
               break;
            case TrackingWorkflowEvent.Changed:
               argsText = string.Format("Number of Changes: {0}", ((TrackingWorkflowChangedEventArgs)record.EventArgs).Changes.Count);
               break;
            case TrackingWorkflowEvent.Terminated:
               argsText = ((TrackingWorkflowTerminatedEventArgs)record.EventArgs).Exception.Message;
               break;
            default:
               // no need to do anything;
               break;
            }
            row.Cells[ArgsColumn.Name].Value = argsText;
             }
        }
 private void dgvSearchCriteria_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     for (int i = e.RowIndex; i < e.RowIndex + e.RowCount; i++)
     {
         setNewRowDefaultValues(i);
     }
 }
Exemple #9
0
 private void dataGridViewDSNhanVien_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
 {
     for (int i = 0; i < dataGridViewDSNhanVien.Rows.Count; i++)
     {
         dataGridViewDSNhanVien.Rows[i].Cells["STT"].Value = Convert.ToString(i + 1);
     }
 }
 void m_DataGridView_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     DataGridViewRow datrow =  m_DataGridView.Rows[e.RowIndex];
     //get the version name and match it and populate coresponding user version and changes
     string versionName = datrow.Cells["Version"].Value as string;
     VersionInfo versioninfo;
     m_DataManager.VersionInfoFromVersionName.TryGetValue(versionName, out versioninfo);
     if (versioninfo.UserVersName != null)
     {
         DataGridViewComboBoxCell co = datrow.Cells["UserVersions"] as DataGridViewComboBoxCell;
         foreach (string userverionname in versioninfo.UserVersName)
         {
             co.Items.Add(userverionname);
         }
     }
     if (versioninfo.changesInVersion != null)
     {
         DataGridViewComboBoxCell co = datrow.Cells["Changes"] as DataGridViewComboBoxCell;
         foreach (ChangeInstruction changeinstruction in versioninfo.changesInVersion)
         {
             if (changeinstruction.change != ChangeType.Rename)
             {
                 co.Items.Add(changeinstruction.change + " " + changeinstruction.externalLocation);
             }
             else
             {
                 co.Items.Add(changeinstruction.change + " " + changeinstruction.folderUnit.oldLocation + " to " + changeinstruction.externalLocation);
             }
         }
     }
 }
        private void traceDataGridView_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            if (!Settings.Default.EnableAutoScroll) return;

            if (traceDataGridView.CurrentCell == null) return;

            traceDataGridView.CurrentCell = traceDataGridView.Rows[e.RowIndex].Cells[traceDataGridView.CurrentCell.ColumnIndex];
        }
Exemple #12
0
 void prescriptionList_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     for (int i = e.RowIndex; i < e.RowIndex + e.RowCount; i++)
     {
         Prescription p = (Prescription)this.prescriptionBindingSource[i];
         this.prescriptionList.Rows[i].Cells[1].Value = p.MedicinesToString();
     }
 }
        private void DataInformTable_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            if (String.Compare(DataInformTable[0, e.RowIndex].Value.ToString(), "Технические требования") == 0)
            {
                DataInformTable.Rows[e.RowIndex].Height = 50;

            }
        }
Exemple #14
0
 private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     if (!notice)
         return;
     string k = dataGridView1.Rows[e.RowIndex].Cells[0].Value as string;
     if (k == null)
         k = string.Empty;
     T.addString(k);
 }
        private void dgvGrades_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            for (int i = 0; i < e.RowCount; i++)
            {
                this.dgvGrades.Rows[e.RowIndex + i].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight;

                this.dgvGrades.Rows[e.RowIndex + i].HeaderCell.Value = (e.RowIndex + i + 1).ToString();
            }
        }
 private void DataGridView1_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
 {
     Class1.trigia = 0;
     for (int i = 0; i < dgv.Rows.Count - 1; i++)
     {
         Class1.trigia += Convert.ToInt32(dgv.Rows[i].Cells[4].Value) / 1000 * Convert.ToInt32(dgv.Rows[i].Cells[2].Value);
     }
     textBox32.Text = Class1.trigia.ToString();
 }
Exemple #17
0
        private void Exit_regime_dataGridView_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            Exit_regime_dataGridView.Rows[e.RowIndex].Tag = -1;
        }
Exemple #18
0
 private void parameter_table_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
 {
     // Update the labels to reflect changes to the selection.
     //
     if (file_loaded)
     {
         recentAddedRow = e.RowIndex;
     }
 }
 private void dataGridView1_RowsAdded(object sender,
      DataGridViewRowsAddedEventArgs e)
 {
     if (newRowNeeded)
     {
         newRowNeeded = false;
         numberOfRows = numberOfRows + 1;
     }
 }
Exemple #20
0
        private void Authorization_dataGridView_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            Authorization_dataGridView.Rows[e.RowIndex].Tag = -1;
        }
Exemple #21
0
        private void alertsDataGridView_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
        {
            foreach (DataGridViewRow row in alertsDataGridView.Rows)
            {
                DataGridViewCell strEvent = row.Cells["eventName"];

                row.DefaultCellStyle.BackColor = a.changeColor(strEvent.Value.ToString());
                row.DefaultCellStyle.ForeColor = a.changeColor(strEvent.Value.ToString(), "front");
            }
        }
Exemple #22
0
 private void ExtensionTableGrid_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
 {
     try
     {
         for (int i = 0; i < 50; i++)
         {
             ExtensionTableGrid.Rows[e.RowIndex + i].HeaderCell.Value = (e.RowIndex + i + 1).ToString();
         }
     }
     catch { }
 }
 private void participantsGrid_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     if(e.RowIndex != 0)
     {
         participantsGrid.Rows[e.RowIndex].Cells[4].Value =
             Convert.ToInt32(participantsGrid.Rows[e.RowIndex - 1].Cells[4].Value) + 1;
     }
     else
     {
         participantsGrid.Rows[e.RowIndex].Cells[4].Value = e.RowIndex;
     }
 }
Exemple #24
0
 protected override void OnRowsAdded(DataGridViewRowsAddedEventArgs e)
 {
     for (int i = e.RowIndex; i < e.RowIndex + e.RowCount; i++)
     {
         DataGridViewRow row = Rows[i];
         LogItem item = (LogItem)row.DataBoundItem;
         row.DefaultCellStyle.ForeColor = item.TextColor;
     }
     FirstDisplayedScrollingRowIndex = Rows.Count - 1;//最後の列までスクロール
     Invalidate(true);
     base.OnRowsAdded(e);
 }
Exemple #25
0
 private void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     //MessageBox.Show(e.RowIndex.ToString());
     //return;
     if (e.RowIndex < 0)
         return;
     //if (e.RowIndex == 0)
         //dataGridView1.Rows[e.RowIndex].Tag = UpdateType.None;
     else
         //dataGridView1.Rows[e.RowIndex - 1].Tag = UpdateType.Insert;
         dataGridView1.Rows[dataGridView1.RowCount - 1].Tag = UpdateType.Insert;
 }
 //添加行时, 自动更新行号
 void dataGridViewCheckUser_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
 {
     if (dataGridViewCheckUser != null)
     {
         if (dataGridViewCheckUser.Rows != null)
         {
             for (int i = 0; i < dataGridViewCheckUser.Rows.Count; i++)
             {
                 dataGridViewCheckUser.Rows[i].HeaderCell.Value = (i + 1).ToString();
             }
         }
     }
 }
Exemple #27
0
        /*
         * RowsAdded
         * Add a parser reference when a new row is added
         */

        void dataGridView1_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
        {
            try
            {
                form.addReference(
                    this.dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString(),
                    this.dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString()
                    );
            }
            catch (Exception ex)
            {
            }
        }
Exemple #28
0
        protected override void OnRowsAdded(System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
        {
            base.OnRowsAdded(e);
            if ((e.RowIndex >= 0) && (Rows[e.RowIndex] != null))
            {
                Rows[e.RowIndex].MinimumHeight = 22;
            }

            //
            System.EventHandler eventHandler = OnAddRow;
            if (eventHandler != null)
            {
                eventHandler(this, e);
            }
        }
Exemple #29
0
        private void dgvProdutos_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            for (int index = e.RowIndex; index <= e.RowIndex + e.RowCount - 1; index++)
            {
                DataGridViewRow row = dgvProdutos.Rows[index];

                if (row.Cells[0].Value.ToString().EndsWith("P"))
                {
                    row.DefaultCellStyle.ForeColor = Color.Red;
                }
                else
                {
                    row.DefaultCellStyle.ForeColor = Color.Black;
                }
            }
        }
Exemple #30
0
 private void DataGrid_RowAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     double ifuValue = 0;
     string ifuType;
     try
     {
         ifuType = Convert.ToString(dataGridView1.Rows[e.RowIndex].Cells[0].Value);
         ifuValue = Convert.ToDouble(dataGridView1.Rows[e.RowIndex].Cells[1].Value);
     }
     catch (Exception ex) {
         SmartISLib.Messages.Error("Špatný formát záznamu. Používejte desetinné čárky místo teček.");
         return;
     }
     string sql = String.Format("insert into TIFU(ifuType, ifuValue) values('{0}', {1})", ifuType, ifuValue.ToString(CultureInfo.InvariantCulture));
     // TODO - nefunguje nejlepe: otestovat poradne.
     SmartISLib.Data.Execute(sql);
 }
        private void dgv_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            var cell = (dgv[0, e.RowIndex] as DataGridViewComboBoxCell);
            if(cell.Items.Count == 0)
            foreach(var item in new string[]{"", "Ctrl", "Ctrl + Shift", "Ctrl + Alt", "Shift", "Shift + Alt", "Alt", "Ctrl + Shift + Alt"})
                cell.Items.Add(item);

            cell = (dgv[1, e.RowIndex] as DataGridViewComboBoxCell);
            if (cell.Items.Count == 0)
            foreach (var item in Enum.GetValues(typeof(Keys)))
                cell.Items.Add(item);

            cell = (dgv[2, e.RowIndex] as DataGridViewComboBoxCell);
            if (cell.Items.Count == 0)
            foreach (var item in Enum.GetValues(typeof(FCTBAction)))
                cell.Items.Add(item);
        }
Exemple #32
0
        protected void ServerRowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
        {
            for (int index = e.RowIndex; index <= e.RowIndex + e.RowCount - 1; index++)
            {
                DataGridViewRow row       = this.Rows[index];
                Server          servAdded = (Server)row.DataBoundItem;

                if (servAdded.HasPassword)
                {
                    row.Cells["locked"].Value = LockedImage;
                }
                else
                {
                    row.Cells["locked"].Value = UnlockedImage;
                }
            }
        }
Exemple #33
0
 private void dataGridViewSk_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     try
     {
         if (dataGridViewSk.CurrentRow != null)
             for (int i = 0; i < dsSk.Tables["tblSelgerkoder"].Rows.Count; i++)
                 dsSk.Tables["tblSelgerkoder"].Rows[i]["Avdeling"] = main.appConfig.Avdeling;
     }
     catch (DeletedRowInaccessibleException ex)
     {
         Log.n("Unntak oppstod under oppdatering av selgerliste. Exception: " + ex, Color.Red);
     }
     catch (Exception ex)
     {
         FormError errorMsg = new FormError("Unntak oppstod under oppdatering av selgerliste", ex);
         errorMsg.ShowDialog(this);
     }
 }
        void grid_DanhSachXeDat_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
        {
            DataGridViewRow Row = grid_DanhSachXeDat.Rows[e.RowIndex];

            Row.Cells["MaXe"].Value       = Xe.Ma;
            Row.Cells["TenXe"].Value      = Xe.TenXe;
            Row.Cells["HangXe"].Value     = Xe.TenHangXe;
            Row.Cells["Mau"].Value        = MauXe.Mau;
            Row.Cells["MaMau"].Value      = MauXe.MaMau;
            Row.Cells["GiaTienBan"].Value = Xe.GiaTienBan;
            Row.Cells["SoLuong"].Value    = TimXe.SoLuong;
            Decimal ThanhTien         = TimXe.SoLuong * Xe.GiaTienBan;
            Decimal TongTienTruocThue = Decimal.Parse(txt_ro_TongTienTruocThue.Text) + ThanhTien;
            Decimal Thue = (TongTienTruocThue * 10) / 100;

            Row.Cells["ThanhTien"].Value  = ThanhTien.ToString();
            txt_ro_TongTienTruocThue.Text = TongTienTruocThue.ToString();
            txt_ro_Thue.Text     = Thue.ToString();
            txt_ro_TongTien.Text = (TongTienTruocThue + Thue).ToString();
        }
 private void dataGridView_Main_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     var language = GetLanguage.Instance(PublicVariables.Language);
     var actionId = (int)dataGridView_Main.Rows[e.RowIndex].Cells[Action.Name].Value;
     switch (actionId)
     {
         case 1:
             dataGridView_Main.Rows[e.RowIndex].Cells[ActionShow.Name].Value = language.GetString(LanguageId.Deposit);
             break;
         case 2:
             dataGridView_Main.Rows[e.RowIndex].Cells[ActionShow.Name].Value = language.GetString(LanguageId.Withdraw);
             break;
         case 3:
             dataGridView_Main.Rows[e.RowIndex].Cells[ActionShow.Name].Value = language.GetString(LanguageId.Lend);
             break;
         default:
             dataGridView_Main.Rows[e.RowIndex].Cells[ActionShow.Name].Value = language.GetString(LanguageId.Borrow);
             break;
     }
 }
 private void dgvBranch_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     if (e.RowIndex > 0)
     {
         int ID_Counter = 1;
         bool Find = true;
         while (Find)
         {
             Find = false;
             for (int rowC = 0; rowC < dgvBranch.RowCount - 2; rowC++)
             {
                 if (int.Parse(dgvBranch[0, rowC].Value.ToString()) == ID_Counter)
                 {
                     ID_Counter++;
                     Find = true;
                     break;
                 }
             }
         }
         dgvBranch.Rows[e.RowIndex - 1].Cells[0].Value = ID_Counter;
     }
 }
Exemple #37
0
 private void tablica_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     //kad se doda novi redak, ispisi redni broj u header
     //int indexTaba = tabControl1.SelectedIndex;
     tGrid.Rows[tGrid.RowCount - 1].HeaderCell.Value = tGrid.RowCount.ToString();
 }
Exemple #38
0
 //important à décommenter
 void TableRowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
 {
     table.CurrentRow.Cells[1].Value = Attribut.INTEGER;
 }
Exemple #39
0
 void dataGridView1_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
 }
Exemple #40
0
 private void trackingDataGrid_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     this.trackingDataGrid.Rows[e.RowIndex].Cells[0].Value = true;
 }
 /// <summary>
 /// generate serialNo while rows added of dgvProduction
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvProduction_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     try
     {
         if (!isFillMode)
         {
             ProductionSerialNo();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("SJ:63" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Exemple #42
0
 private void dgrLager_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
   if (ansicht != "KUNDE" && kategorie == 0)
   {
     tsItemZeileLoeschen.Enabled = true;
   }
   else
   {
     tsItemZeileLoeschen.Enabled = false;
     tsNeueZeile.Enabled = false;
   }
 }
        private void dataGridViewCSharp_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            if (BusyPopulating)
                return;

            DataGridView grid = (DataGridView)sender;

            for (int i = 0; i < e.RowCount; i++)
            {
                DataGridViewRow row = grid.Rows[e.RowIndex + i - 1];
                DotNetType dotnetType = new DotNetType();
                Utility.DotNetTypes.Add(dotnetType);
                row.Tag = dotnetType;
            }
        }
Exemple #44
0
 private void dataGridView4_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
 {
     dataGridView8.Rows.Add();
 }
Exemple #45
0
 private void MetroGrid_RowsAdded(object sender, System.Windows.Forms.DataGridViewRowsAddedEventArgs e)
 {
     OnRowsAdded(e);
 }