原代码 private void hR面试管理DataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
string HtmlCode = this.hR面试管理DataGridView.CurrentRow.Cells["简历"].Value.ToString();
webBrowser1.DocumentText = HtmlCode;
}
datagridview中有多个列,现在发现只有在某个列点击才会有用,为什么呢?
{
string HtmlCode = this.hR面试管理DataGridView.CurrentRow.Cells["简历"].Value.ToString();
webBrowser1.DocumentText = HtmlCode;
}
datagridview中有多个列,现在发现只有在某个列点击才会有用,为什么呢?
只有点击到单元格的内容时此事件才会发生,如果是空的单元格(没有内容),就不会发生
用CellClick事件试试
在单元格中的内容被单击时发生
http://msdn.microsoft.com/zh-cn/library/system.windows.forms.datagridview.cellcontentclick(VS.80).aspx