How to get previous row # on CurrentCellChanged datagrid event

J

JJ

In a datagrid, I can get the cell row/col where the focus was moved to using
the CurrentCellChanged event. But I need to find out what row (if any) the
focus was in prior to moving - how can I do that?

What I'm trying to accomplish with this is to have a button display in a
cell, but only on the "current" row. When a new row becomes the current
row, I want the button to become invisible on the row that previously had
the focus (if any).
 
J

JJ

OK, I guess I posted this too soon - I found in another post that I will
need to keep track of this myself.

But here's my new problem - I track the last row and on CurrentCellChanged,
I hide the button on the previous row - but that causes the
CurrentCellChanged event to fire again and I am then "stuck" in the first
row I click on.
 

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