• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.DataGridViewDataErrorEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Forms.DataGridViewDataErrorEventArgs的典型用法代码示例。如果您正苦于以下问题:C# DataGridViewDataErrorEventArgs类的具体用法?C# DataGridViewDataErrorEventArgs怎么用?C# DataGridViewDataErrorEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataGridViewDataErrorEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了DataGridViewDataErrorEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: bitacoraGrid_DataError

 private void bitacoraGrid_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     /* Evento cuando ocurre un error en los datos */
     if (e.Context == DataGridViewDataErrorContexts.Commit)
         Program.main.statusStrip.Text = "Error, porfavor corrija el dato en la celda (" + e.RowIndex + "," + e.ColumnIndex + ").";
         //MessageBox.Show("Error, porfavor corrija el dato en la celda (" + e.RowIndex + "," + e.ColumnIndex + ").","Error",MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
 }
开发者ID:BigChief45,项目名称:LawHelper,代码行数:7,代码来源:ByH.cs


示例2: dgvStatVarProperties_DataError

 private void dgvStatVarProperties_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     Debug.WriteLine(e.Exception.Message);
     Debug.WriteLine(e.ColumnIndex);
     Debug.WriteLine(e.RowIndex);
     Debug.WriteLine(e.ToString());
 }
开发者ID:runarbe,项目名称:Avinet.Adaptive.Statistics.ExcelAddIn,代码行数:7,代码来源:UploadForm.StatVarGrid.cs


示例3: RaiseDataError

 protected void RaiseDataError(DataGridViewDataErrorEventArgs e)
 {
     if (this.dataGridView != null)
     {
         this.dataGridView.OnDataErrorInternal(e);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:DataGridViewElement.cs


示例4: productsDataGridView_DataError

 private void productsDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     int row = e.RowIndex + 1;
     string errorMessage = "A data error occurred.\n" +
         "Row: " + row + "\n" +
         "Error: " + e.Exception.Message;
     MessageBox.Show(errorMessage, "Data Error");
 }
开发者ID:fakeshark,项目名称:CSharpProjects,代码行数:8,代码来源:Form1.cs


示例5: RemoteBranchesDataError

        private void RemoteBranchesDataError(object sender, DataGridViewDataErrorEventArgs e)
        {
            MessageBox.Show(this,
                string.Format(_remoteBranchDataError.Text, RemoteBranches.Rows[e.RowIndex].Cells[0].Value,
                    RemoteBranches.Columns[e.ColumnIndex].HeaderText));

            RemoteBranches.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = "";
        }
开发者ID:Carbenium,项目名称:gitextensions,代码行数:8,代码来源:FormRemotes.cs


示例6: DataGridView_DataError

 private void DataGridView_DataError( object sender, DataGridViewDataErrorEventArgs e )
 {
     MessageBox.Show( "Error happened " + e.Context.ToString() + "\n Exception Message: " + e.Exception.Message );
     if ( ( e.Exception ) is ConstraintException ) {
         DataGridView view = (DataGridView)sender;
         view.Rows[e.RowIndex].ErrorText = "an error";
         e.ThrowException = false;
     }
 }
开发者ID:WaterskiScoring,项目名称:WaterskiScoringSystem,代码行数:9,代码来源:TrickListMaint.cs


示例7: productsDataGridView_DataError

        private void productsDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
        {
            int row = e.RowIndex + 1;
            int col = e.ColumnIndex + 1;

            string strErrorMessage = "A data error occurred.\nRow: " + row +
                                     ", Column: " + col + "\nError: " + e.Exception.Message;
            MessageBox.Show(strErrorMessage, "Data Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
开发者ID:anneilb,项目名称:ce-dev,代码行数:9,代码来源:frmProductMaintenance.cs


示例8: timeLogView_DataError

 private void timeLogView_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     string columnName = this.timeLogView.Columns[e.ColumnIndex].HeaderText;
     if(e.ColumnIndex == 1)
         ShowErrorMessage(Constants.PleaseEnterNotEmptyActivityName,
                         String.Format(Constants.IncorrectValueInColumn, columnName));
     else
         ShowTimeNotValidMessage(columnName);
     e.Cancel = true;
 }
开发者ID:gayancc,项目名称:lazycure-code,代码行数:10,代码来源:TimeLogEditor.cs


示例9: CellDataError

 public static void CellDataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     e.Cancel = true;
     e.ThrowException = false;
     if ((e.RowIndex != -1) && (e.ColumnIndex != -1))
     {
         (sender as DataGridView).Rows[e.RowIndex].Cells[e.ColumnIndex].ErrorText = e.Exception.Message;
     }
     else
         e.ThrowException = true;
 }
开发者ID:UGTU,项目名称:UGTUKadrProject,代码行数:11,代码来源:DataGridViewHelper.cs


示例10: gridClasses_DataError

        private void gridClasses_DataError(object sender, DataGridViewDataErrorEventArgs e)
        {
            ConstraintException ex = e.Exception as ConstraintException;
              if (ex != null) {
            MessageBox.Show(this, "The name has already been used. Please use a unique Class Name.",
              Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
            e.ThrowException = false;

              } else {
            e.ThrowException = true;

              }
        }
开发者ID:oobayly,项目名称:LDYC-Trophies,代码行数:13,代码来源:EditClassesDialog.cs


示例11: accountDataGridView_DataError

 private void accountDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     try
     {
         this.Validate();
         this.accountBindingSource.EndEdit();
         this.tableAdapterManager.UpdateAll(this.master_Data);
     }
     catch (NoNullAllowedException nonullallowed_e)
     {
         MessageBox.Show("id " + prefix + " harus diisi.");
     }
 }
开发者ID:aldowrable,项目名称:accountingsolution,代码行数:13,代码来源:Modul_Akuntansi_KodePerkiraan.cs


示例12: DataGridView_DataError

 private void DataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     if (e.Exception.GetType() == typeof(FormatException))
     {
         MessageBox.Show("Invalid value entered", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         e.Cancel = false;
         e.ThrowException = false;
     }
     else
     {
         MessageBox.Show("An unexpected error has occured:\n" + e.Exception, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         e.Cancel = false;
         e.ThrowException = false;
     }
 }
开发者ID:phinixx14,项目名称:Property-Managment,代码行数:15,代码来源:ViewOccurenceDataForm.cs


示例13: mcyclesBindingSource_DataError

        // An error in the data occurred.
        private void mcyclesBindingSource_DataError(object sender,
            DataGridViewDataErrorEventArgs e)
        {
            // Don't throw an exception when we're done.
            e.ThrowException = false;

            // Display an error message.
            string txt = "Error with " +
                //mcycles.Columns[e.ColumnIndex].HeaderText +
                "\n\n" + e.Exception.Message;
            MessageBox.Show(txt, "Error",
                MessageBoxButtons.OK, MessageBoxIcon.Error);

            // If this is true, then the user is trapped in this cell.
            e.Cancel = false;
        }
开发者ID:Seosamhoc,项目名称:mockAss,代码行数:17,代码来源:frmBikes.cs


示例14: jasaDokterDataGridView_DataError

 private void jasaDokterDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     try
     {
         this.Validate();
         //this.jasaDokterBindingSource.EndEdit();
         //this.tableAdapterManager.UpdateAll(this.penjualan_Data);
     }
     catch (NullReferenceException ee)
     {
     }
     catch (ConstraintException ee)
     {
         MessageBox.Show("Duplikasi Kode Jasa, silakan input Kode Jasa yang unik");
     }
 }
开发者ID:aldowrable,项目名称:accountingsolution,代码行数:16,代码来源:Modul_Data_JasaDokter.cs


示例15: bankDataGridView_DataError

 private void bankDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     try
     {
         this.Validate();
         this.bankBindingSource.EndEdit();
         this.tableAdapterManager.UpdateAll(this.master_Data);
     }
     catch (NullReferenceException ee)
     {
     }
     catch (ConstraintException ee)
     {
         MessageBox.Show("Duplikasi ID Bank, silakan input ID Bank yang unik");
     }
 }
开发者ID:aldowrable,项目名称:accountingsolution,代码行数:16,代码来源:Modul_Data_Bank.cs


示例16: kelompokProdukDataGridView_DataError

 private void kelompokProdukDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     try
     {
         this.Validate();
         this.kelompokProdukBindingSource.EndEdit();
         this.tableAdapterManager.UpdateAll(this.stock_Data);
     }
     catch (NullReferenceException ee)
     {
     }
     catch (ConstraintException ce)
     {
         MessageBox.Show("Duplikasi kode kelompok, silakan input kode kelompok yang unik");
     }
 }
开发者ID:aldowrable,项目名称:accountingsolution,代码行数:16,代码来源:Modul_Barang_DataKelompok.cs


示例17: loginDataGridView_DataError

 private void loginDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     try
     {
         this.Validate();
         this.loginBindingSource.EndEdit();
         this.tableAdapterManager.UpdateAll(this.login_Data);
     }
     catch (NoNullAllowedException nonullallowed_e)
     {
         MessageBox.Show("Nama " + prefix + " harus diisi.");
     }
     catch (ConstraintException ee)
     {
         MessageBox.Show("Duplikasi id " + prefix + ", silakan input id " + prefix + " yang unik");
     }
 }
开发者ID:aldowrable,项目名称:accountingsolution,代码行数:17,代码来源:Modul_Data_Karyawan.cs


示例18: DataGridView_DataError

        private void DataGridView_DataError( object sender, DataGridViewDataErrorEventArgs e )
        {
            MessageBox.Show( "Error happened " + e.Context.ToString() );
            if ( e.Context == DataGridViewDataErrorContexts.Commit ) {
                MessageBox.Show( "Commit error" );
            }
            if ( e.Context == DataGridViewDataErrorContexts.CurrentCellChange ) {
                MessageBox.Show( "Cell change" );
            }
            if ( e.Context == DataGridViewDataErrorContexts.Parsing ) {
                MessageBox.Show( "parsing error" );
            }
            if ( e.Context == DataGridViewDataErrorContexts.LeaveControl ) {
                MessageBox.Show( "leave control error" );
            }
            if ( ( e.Exception ) is ConstraintException ) {
                DataGridView view = (DataGridView)sender;
                view.Rows[e.RowIndex].ErrorText = "an error";
                view.Rows[e.RowIndex].Cells[e.ColumnIndex].ErrorText = "an error";

                e.ThrowException = false;
            }
        }
开发者ID:WaterskiScoring,项目名称:WaterskiScoringSystem,代码行数:23,代码来源:TourDivOrder.cs


示例19: GetError

            public string GetError(int boundColumnIndex, int columnIndex, int rowIndex)
            {
                Debug.Assert(rowIndex >= 0);

                IDataErrorInfo errInfo = null;
                try
                {
                    errInfo = this.currencyManager[rowIndex] as IDataErrorInfo;
                }
                catch (Exception exception)
                {
                    if (ClientUtils.IsCriticalException(exception) && !(exception is IndexOutOfRangeException))
                    {
                        throw;
                    }
                    DataGridViewDataErrorEventArgs dgvdee = new DataGridViewDataErrorEventArgs(exception, columnIndex, rowIndex,
                                                                                               DataGridViewDataErrorContexts.Display);
                    this.owner.OnDataErrorInternal(dgvdee);
                    if (dgvdee.ThrowException)
                    {
                        throw dgvdee.Exception;
                    }
                }

                if (errInfo != null)
                {
                    return errInfo[this.props[boundColumnIndex].Name];
                }
                else
                {
                    return String.Empty;
                }
            }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:33,代码来源:DataGridViewDataConnection.cs


示例20: dgvPRPlanInfo_DataError

 private void dgvPRPlanInfo_DataError(object sender, DataGridViewDataErrorEventArgs e)
 {
     e.Cancel = true;
 }
开发者ID:jun-quan-Lai,项目名称:SmallERP,代码行数:4,代码来源:FormBrowsePRPlan.cs



注:本文中的System.Windows.Forms.DataGridViewDataErrorEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.DataGridViewEditingControlShowingEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Forms.DataGridViewComboBoxColumn类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap