public int GetRowIndexAt(int mouseLocation_Y)

{

if (dvaw.FirstDisplayedScrollingRowIndex < 0)

{

return -1;

}

if (dvaw.ColumnHeadersVisible == true && mouseLocation_Y <= dvaw.ColumnHeadersHeight)

{

return -1;

}

int index = dvaw.FirstDisplayedScrollingRowIndex;

int displayedCount = dvaw.DisplayedRowCount(true);

for (int k = 1; k <= displayedCount; )

{

if (dvaw.Rows[index].Visible == true)

{

Rectangle rect = dvaw.GetRowDisplayRectangle(index, true);  // 取该区域的显示部分区域

if (rect.Top <= mouseLocation_Y && mouseLocation_Y < rect.Bottom)

{

return index;

}

k++;

}

index++;

}

return -1;

}

最新文章

  1. java cookie 工具类
  2. linux centos yum安装LAMP环境
  3. 递归练习(C语言)
  4. elasticsearch1.0 升级2.2的数据备份和恢复
  5. 安卓4.0下rem显示不正常的问题
  6. asp.net DropDownList无刷新ajax二级联动实现详细过程
  7. 在地图上添加POI(二)
  8. 深度剖析:CDN内容分发网络技术原理--转载
  9. 莱特币ltc在linux下的多种挖矿方案详解
  10. perl 自动登陆网站发短信
  11. 使用AndroidFrameworks开发和应用隐藏类 or Android使用自定义framework开发与应用
  12. [Usaco2008 Dec]Hay For Sale 购买干草[01背包水题]
  13. CLR类型设计之方法与构造器
  14. 【架构篇】OCP和依赖注入
  15. 使用JdbcTemplate 操作PostgreSQL,当where条件中有timestamp类型时,报错operator does not exist: timestamp w/out timezone
  16. JS(JavaScript)的进一步了解5(更新中&#183;&#183;&#183;)
  17. AI之旅(6):神经网络之前向传播
  18. (转)用JS获取地址栏参数的方法(超级简单)
  19. 在C语言中不使用任何中间变量如何将a、b的值进行交换(三种方法)——来自一小萌新工程师的复习
  20. Python实现邮件的批量发送

热门文章

  1. Java基础(7)-集合类3
  2. 【FINAL】NOI
  3. css3+jquery+js做的翻翻乐小游戏
  4. 防止xss,sql攻击函数
  5. JavaScriptSerializer 日期处理 JSON.Net
  6. 使用Intellij Idea打开项目不能显示树形目录
  7. Handsontable-一款仿 Excel效果的表格插件使用总结 96
  8. C# GDI+编程
  9. spring学习-2
  10. uva1636 - Headshot(条件概率)