码迷,mamicode.com
首页 > 其他好文 > 详细

设置gridcontrol的焦点行

时间:2014-06-11 23:14:11      阅读:2192      评论:0      收藏:0      [点我收藏+]

标签:style   code   tar   get   string   os   

 private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                DataRow dradd = gridView1.GetDataRow(gridView1.FocusedRowHandle);
                //params object[]
                DataRow dr = dtselected.NewRow();
                dr["TEMP_NAME"] = dradd["MR_NAME"].ToString();
                dr["TEMP_CODE"] = dradd["MR_CODE"].ToString();
                dr["FILE_PATH"] = dradd["ACCESS_PATH"].ToString();
                dr["FILE_NAME"] = dradd["TEMPLET_FILE_NAME"].ToString();
                dtselected.Rows.Add(dr.ItemArray);
                gridView2.FocusedRowHandle = dtselected.Rows.Count - 1;
                gc_selected.RefreshDataSource();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }

设置gridcontrol的焦点行,布布扣,bubuko.com

设置gridcontrol的焦点行

标签:style   code   tar   get   string   os   

原文地址:http://www.cnblogs.com/wuhailong/p/3772273.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!