Hi IG,
I have this code:
private void _grid_KeyDown(object sender, KeyEventArgs e){ //delete key = clear the current cell if (e.KeyCode == Keys.Delete || e.KeyCode == Keys.Back) { if (0 == (_grid.CurrentState & UltraGridState.InEdit)) if (_grid.ActiveCell != null) if (_grid.ActiveCell.Value is CellClass) (_grid.ActiveCell.Value as CellClass).Clear(); }}
The problem is, the cell is not refreshed/repainted until you move the mouse over, or scroll/resize the column, etc. Cell is displayed as string, and CellClass has ToString() via IConvertible.
I tried adding BeginInvoke() around -> no success.I tried _grid.ActiveCell.Refresh() -> no success.I tried _grid.Invalidate(_grid.ActiveCell.GetUIElement().Rect) -> no success.I tried reassign the same value to the ActiveCell -> no success.I debugged, and the ActiveCell.Text immediately changes to "" after calling Clear().
What could be the problem? Thanks.
Hello Michael,
Thank you for contacting Infragistics Support.
In order to give you my best possible solution for your issue can you please give me a little more information regarding your case:
1) How you have implemented your CellClass?
2) Have you implemented INotifyPropertyChangedinterface in your CellClass?
3) Did you call the PropertyChanged event in your custom CellClass?
It will help if you can provide a small, isolated sample application that demonstrates the behavior you are experience.
Waiting for your feedback.