Changing grid cells programatically

J

JezB

I have a DataGrid and I'm changing the value in one of the cells
programatically.

Problem is, my change isn't being picked up (and saved in the underlying
data source), unless I manually tab off the cell in the grid.

I've tried calling BeginEdit and EndEdit around the code that populates the
cell, to no avail.

What am I missing?
 
J

JezB

Hmmmm, I added this :

SendKeys.Send("{TAB}+{TAB}"); // tab then backtab, so that text change
recognised in datasource

and it sorted it out. I'm not convinced it's good programming practice
however!
 

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