Dev的双击Gridview的DoubleClick

注意: 是GridView的Double而不是GridControl
private void gridView1_DoubleClick(object sender, EventArgs e)
{
    GridView detailGrid = (sender as GridView);
    GridHitInfo hitInfo = (detailGrid.CalcHitInfo((e as MouseEventArgs).Location));

    if (hitInfo != null && (hitInfo.InRow || hitInfo.InRowCell) && hitInfo.RowHandle >= 0)
    {
        DataRow row = detailGrid.GetDataRow(hitInfo.RowHandle);
        //读取日志内容
        string fileName = row["执行日志名称"].ToString();               
        ReportLogForm form = new ReportLogForm();
        form.ShowLog(fileName);
        form.Show();
    }
}

posted @ 2013-11-05 14:44  pnljs  阅读(1092)  评论(0编辑  收藏  举报