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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

current cell not updating

Thread ID:

Created:

Updated:

Platform:

Replies:

12412 Mar 29,2004 04:44 PM UTC Apr 8,2004 07:00 PM UTC Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 29, 2004 04:44 PM UTC

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?

Administrator [Syncfusion]
Replied On March 29, 2004 06:00 PM UTC

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

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On March 30, 2004 04:09 PM UTC

Here is the sample. ListChanged_7900.zip

Administrator [Syncfusion]
Replied On 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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;