반응형
public static void GridBandColumnHandCursor(BandedGridView view, params string[]fieldName) {
view.MouseMove += (sender, e) => HandCursor_BandedGridView_MouseMove(sender, e, fieldName);
}
private static void HandCursor_BandedGridView_MouseMove(object sender, MouseEventArgs e, params string[]fieldName) {
BandedGridView view = sender as BandedGridView;
if (view != null) {
DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hitInfo = view.CalcHitInfo(e.X, e.Y);
if (hitInfo.InRowCell == true && Comm.IN(hitInfo.Column.FieldName, fieldName)) {
view.GridControl.Cursor = Cursors.Hand;
} else {
view.GridControl.Cursor = Cursors.Default;
}
}
}
반응형