MethodInvoke 和BindingManagerBase用法 c#

来源:互联网 发布:4种九九乘法表编程 编辑:程序博客网 时间:2024/05/29 19:43
 MethodInvoker methodInvoker = delegate()            {                DataTable dt = dataGridView1.DataSource as DataTable;                if (dt != null)                {                    BindingManagerBase bm = dataGridView1.BindingContext[dataGridView1.DataSource];                    if (bm.Count > 0)                    {                        if (bm.Current != null)                        {                            DataRow row = ((DataRowView)bm.Current).Row;                            MessageBox.Show(row["column1"].ToString());                        }                    }                }            };

原创粉丝点击