2--public class MyDataGrid : DataGrid
{
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{
DataGrid.HitTestInfo hti = this.HitTest(new Point(e.X, e.Y));
if(hti.Type == DataGrid.HitTestType.ColumnResize
|| hti.Type == DataGrid.HitTestType.RowResize)
{
return;
}
base.OnMouseDown(e);
}
}
{
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{
DataGrid.HitTestInfo hti = this.HitTest(new Point(e.X, e.Y));
if(hti.Type == DataGrid.HitTestType.ColumnResize
|| hti.Type == DataGrid.HitTestType.RowResize)
{
return;
}
base.OnMouseDown(e);
}
}
解决方案 »
- 如何获取一用户控件上的右键菜单?
- GridView.DataSource新用法
- 请教一个正则表达式,有关帖子都看过了,找不到答案,请达人帮忙,100分
- 一个难题
- 用C#如何将excel照相机功能抓取的图片读到pictruebox中去?
- 请问:如何在DATAVIEW的ROWFILTER里查找一个INT类型的列为空的行?
- C#中使用window.open命令时的命名空间是什么?在线等,谢谢!
- 请问为什么datagrid的这个属性 VB.NET有, C#没有?
- c#可以用来游戏编程吗?
- CSDN助手.Net Release!!!(希望斑竹能将此贴置顶)
- DB2中无缘无故出现55039的错误,怎么解决?
- 无法启动调试,返回服务器错的信息。
1--用DataRow.RowError,你查查帮助就可以了。
2:DataGrid1.HeaderStyle.Height = ...;
DataGrid1.HeaderStyle.Width = ...;
3:只能在做一行,统计!!
select picturesize from picture
union
select sum(picturesize) from picture