D
D
Dmitry Korolev2018-02-28 19:11:36
C++ / C#
Dmitry Korolev, 2018-02-28 19:11:36

How can I find out the index of the string I'm pointing to when I'm dragging an object?

Can you please tell me how to find the index of the datagridview row by the position of x and y?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Korolev, 2018-02-28
@adressmoeistranici

var h = dgvResult.HitTest(e.X, e.Y);
if (h.Type == DataGridViewHitTestType.Cell)
            { = h.RowIndex;
}

D
Dmitry Eremin, 2018-02-28
@EreminD

datagridview.CurrentCell.RowIndex

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question