Ive struck a problem in which the current cell''s displayed value isnt updated until selection box is moved.
That is, when the current cell has a black border, but no insertion point, changes to the underlying datasource arent displayed in that cell until the black border is moved off the cell.
Is there a way in which I can enable updating the current selected cell, assuming it isnt being edited?
ADAdministrator Syncfusion Team March 29, 2004 01:00 PM
Try calling grid.RefreshRange(grid.CurrentCell.RangeInfo, true); to see if that does what you need.
ADAdministrator Syncfusion Team March 30, 2004 10:11 AM
Unfortunately, calling RefreshRange isnt possible, as it is the IBindingList that is pushing out the changes I want to see.
ADAdministrator Syncfusion Team March 30, 2004 11:08 AM
Here is a little sample. In it, the only time I see the problem is if the current cell is actually activated for editing with a blinking edit cursor. At that point, if the row is updated outside the grid, the currentcell does not show the new value until you leave it.
In the sample, you can handle this problem by listening to the IBindingList.ListChanged event, and explicitly call Refresh on the current cell if it is the current row being changed. If you uncomment the code that subcribes to the event, you will see the currentcell get updated along with the rest of the row when you click the button.
ADAdministrator Syncfusion Team March 30, 2004 11:09 AM
ADAdministrator Syncfusion Team April 8, 2004 02:00 PM
Ive managed to narrow the problem down to this:
Some of my cells are read only, and its is those cells that arent updated when they are the current cell.
I havent had any luck with the Style.ReadOnly property; even when marked with ReadOnly=true, the cells can still be edited . Im aware of IgnoreReadOnly and have that set to true.
Instead I set Style.CellType="Static", and this happens in the QueryCellInfo handler as it can vary on a cell by cell basis. But... when "Static" cells are the current cell, they arent refreshed when the underlying data changes. Perhaps this is by design, as they are after all "Static"... Its strange that they do update when they arent the current cell.