how to solve mouse event won't fire again until click on another cell in a datagrid

R

Ryan Liu

Hi,

I need the MouseDown event be trigged everytime when you press mouse in a
datagrid (System.Windows.Forms).

Hi,

I need the MouseDown event be trigged everytime when press mouse in a
datagrid (System.Windows.Forms).

But seems mouse event will only fire once, and it seems changed to edit mode
for the cell (even the cell is readonly). The mouse event won't be fired
again
until I click on some other cell and come back and click on the original
cell
again.

Is there a way to make the mouse event always be trigged?

Thanks a lot!
Ryan Liu
 
C

C-Services Holland b.v.

Ryan said:
Hi,

I need the MouseDown event be trigged everytime when you press mouse in a
datagrid (System.Windows.Forms).

Hi,

I need the MouseDown event be trigged everytime when press mouse in a
datagrid (System.Windows.Forms).

But seems mouse event will only fire once, and it seems changed to edit mode
for the cell (even the cell is readonly). The mouse event won't be fired
again
until I click on some other cell and come back and click on the original
cell
again.

Is there a way to make the mouse event always be trigged?

Thanks a lot!
Ryan Liu

IIRC when you go into edit mode it places a textbox where the cell is,
so the textbox is receiving the the mousedown and not the cell/grid.
That's why it's not firing the second time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top