数据网格中单列的鼠标平移功能? [英] Mouse Hove function for single column in the datagrid?
本文介绍了数据网格中单列的鼠标平移功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我将鼠标悬停在特定列上时,我需要提取特定列的值,就像我将鼠标悬停在"0"上一样,我将获得row [0],column [0]及其值的位置保存在列旁边,就像我的值是``0''一样.请查看此链接以获取更多象形文字信息.
http://i.stack.imgur.com/srvwb.png [
I need to extract the value of the particular column when I mousehover to the particular column like if I mousehove to the ''0'', I will get the position like row[0],column[0] and its values saved in side the column like I have ''0'' value. Kindly have a look on this link for more picotrial info.
http://i.stack.imgur.com/srvwb.png[^]
推荐答案
if (e.ColumnIndex > -1 && e.RowIndex > -1)
{
if (dataGridView1[e.ColumnIndex, e.RowIndex].Value != null)
{
label1.Text = dataGridView1[e.ColumnIndex, e.RowIndex].Value.ToString();
}
}
这篇关于数据网格中单列的鼠标平移功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文