G
Guest
I have a DGV that is read only. When selecting a row, the item is edited in
individual controls elsewhere on the form, also bound to the same
bindingsource. The default behavior is that when the value is changed in a
textbox, it only repaints the value in the DGV cell after the textbox commits
the value to the underlying object. I want it to update the DGV cell's
display in real time. To do this, I have code in the textbox's TextChanged
event to update the underlying object's property and refresh the DGV. This
works ok. However, if there are more than a handful of records displayed,
this refresh is slow and distracting.
So two questions:
1) Am I approaching this the correct way? Is there a better way to have the
DGV reflect the changes in real time?
2)If this is the best way, is there any way to refresh/repaint only the
currently selected row?
Thanks for any ideas.
Barry
individual controls elsewhere on the form, also bound to the same
bindingsource. The default behavior is that when the value is changed in a
textbox, it only repaints the value in the DGV cell after the textbox commits
the value to the underlying object. I want it to update the DGV cell's
display in real time. To do this, I have code in the textbox's TextChanged
event to update the underlying object's property and refresh the DGV. This
works ok. However, if there are more than a handful of records displayed,
this refresh is slow and distracting.
So two questions:
1) Am I approaching this the correct way? Is there a better way to have the
DGV reflect the changes in real time?
2)If this is the best way, is there any way to refresh/repaint only the
currently selected row?
Thanks for any ideas.
Barry