Making DataGridView do row-by-row edit instead of cell-by-cell

G

Guest

I am trying to find a way (that is not a hack, hopefully) to get a
DataGridView to behave in a row-by-row editing mode.

Basically, what I see now is this: I type in a cell and the little row
header arrow icon changes to a pencil to show me that I am in edit mode. As
soon as I tab or arrow over to the next cell, it reverts to an arrow,
indicating to me as the user that, although I haven't left the row yet, I
have modified the data.

I know that I can probably find a simple way to override the underlying
behavior (e.g. only commit the changes on a row-by-row basis)... that is not
my concern. I want the user to also think that things are happening on a
row-by-row basis... e.g. I don't want the row-header icon to revert to an
arrow until I tab to the next row, and I want the ESC key to clear ALL
changes in the row, not just the current cell.

Any help or insight would be appreciated.

Thanks,

-John
 
T

tgeraty

Hi John,

I'm trying to do the same thing, and I haven't found any solutions
after scouring the groups. Were you able to solve this problem?
Anyone else know of a good solution?

Thanks,
Todd
 
T

tgeraty

Hi John,

Thanks for responding. I ended up mimicing the behavior to commit the
changes on a row-by-row basis. Unfortunately, the user will still see
the pencil icon change back when they switch cells in the same row.

I would think that remaining in edit mode on a row-by-row basis would
be a common desired behavior.

Todd
 
G

Guest

I am not able to get this far. All the documentation that I read indicates
that the default mode is "editable" but I have tried hitting F2 and typing a
cell and I cannot get the DataGridView to go into edit mode. I have checked
the column is set ReadOnly = False and the RowTemplate has IsReadOnly set to
False so I should be able to edit but no luck. Any feedback on what
properties I need to set/clear?

Thank you.
 

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