调整 DevExpress XtraGrid 列大小的 HitTest 不正确
Incorrect HitTest on resizing a DevExpress XtraGrid column
自定义排序和调整列大小不起作用。
但是在 MouseUp 事件处理程序上实现了自定义排序
if ( hitInfo.InColumnPanel && hitInfo.HitTest == GridHitTest.ColumnEdge)
{
(e as DXMouseEventArgs).Handled = true;
return;
}
不适用于该活动。
希望能够单击列 header 以通过拖动列边缘进行排序和调整大小。
private void OnMouseDown(object sender, MouseEventArgs e)
{
GridHitInfo hitInfo = gridView1.CalcHitInfo(e.Location);
if (hitInfo.HitTest == GridHitTest.ColumnEdge)
{
isEdgeClicked = true;
}
}
private void OnMouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (isEdgeClicked)
{ isEdgeClicked = false;
return;
}
else
{
(e as DXMouseEventArgs).Handled = true;
}
}
自定义排序和调整列大小不起作用。
但是在 MouseUp 事件处理程序上实现了自定义排序
if ( hitInfo.InColumnPanel && hitInfo.HitTest == GridHitTest.ColumnEdge)
{
(e as DXMouseEventArgs).Handled = true;
return;
}
不适用于该活动。
希望能够单击列 header 以通过拖动列边缘进行排序和调整大小。
private void OnMouseDown(object sender, MouseEventArgs e)
{
GridHitInfo hitInfo = gridView1.CalcHitInfo(e.Location);
if (hitInfo.HitTest == GridHitTest.ColumnEdge)
{
isEdgeClicked = true;
}
}
private void OnMouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if (isEdgeClicked)
{ isEdgeClicked = false;
return;
}
else
{
(e as DXMouseEventArgs).Handled = true;
}
}