We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

current cell not updating

Hi, 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?

5 Replies

AD Administrator Syncfusion Team March 29, 2004 06:00 PM UTC

Try calling grid.RefreshRange(grid.CurrentCell.RangeInfo, true); to see if that does what you need.

AD Administrator Syncfusion Team March 30, 2004 03:11 PM UTC

Unfortunately, calling RefreshRange isnt possible, as it is the IBindingList that is pushing out the changes I want to see.

AD Administrator Syncfusion Team March 30, 2004 04:08 PM UTC

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.

AD Administrator Syncfusion Team March 30, 2004 04:09 PM UTC

Here is the sample. ListChanged_7900.zip

AD Administrator Syncfusion Team April 8, 2004 07:00 PM UTC

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.

Live Chat Icon For mobile
Up arrow icon