SVN-Revision: r973
This commit is contained in:
cyf
2025-09-09 01:59:56 +00:00
parent e9603c2287
commit c3b8d39f9d
13 changed files with 879 additions and 178 deletions
@@ -31,7 +31,7 @@ using Lskj.Model;
using System.Text.RegularExpressions;
using System.Reflection;
using DevExpress.Data.Filtering;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
namespace Lskj.Control.MultiGridLookUp
{
@@ -694,6 +694,12 @@ namespace Lskj.Control.MultiGridLookUp
/// <param name="e">The <see cref="DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs"/> instance containing the event data.</param>
private void GridView_RowCellClick(object sender, EventArgs e)
{
Point pt = this.gcMain.GridControl.PointToClient(System.Windows.Forms.Control.MousePosition);
GridHitInfo hitInfo = this.gcMain.CalcHitInfo(pt);
// 判断是否点击在列头(如果是,则不执行双击逻辑)
if (hitInfo.InColumnPanel) return;
DataRow rowItem = this.gcMain.GetFocusedDataRow();
bool isSelect = true;
if (rowItem != null)
@@ -807,6 +813,13 @@ namespace Lskj.Control.MultiGridLookUp
private void GridView_DoubleClick(object sender, EventArgs e)
{
if (this.gcDetail.RowCount == 0) return;
Point pt = this.gcDetail.GridControl.PointToClient(System.Windows.Forms.Control.MousePosition);
GridHitInfo hitInfo = this.gcDetail.CalcHitInfo(pt);
// 判断是否点击在列头(如果是,则不执行双击逻辑)
if (hitInfo.InColumnPanel) return;
DataRow rowItem = this.gcDetail.GetFocusedDataRow();
DataRow[] sourceRowItems = this.DataSource.Select(_id + "=" + rowItem[_id] + "");
if (rowItem != null && sourceRowItems != null && sourceRowItems.Length > 0)