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

CurrentCell.Renderer.Control.Refresh vs CurrentCell.Refresh

Thread ID:

Created:

Updated:

Platform:

Replies:

46440 Jul 13,2006 04:02 AM UTC Jul 13,2006 09:38 AM UTC Windows Forms 1
loading
Tags: GridControl
Leow Kah Man
Asked On July 13, 2006 04:02 AM UTC

CurrentCell.Renderer.Control.Refresh vs CurrentCell.Refresh May I know what are the differences between them? Thank you.

Administrator [Syncfusion]
Replied On July 13, 2006 09:38 AM UTC

CurrentCell.Renderer.Control.Refresh is a method from the .NET Windows Forms Control class. It simply invalidates the client area and forces the control to redraw itself and it child controls. CurrentCell.Refresh is a method in our grid code. It refreshes the current cell and forces it to repaint. If the current cell is not modified, this method will deactivate and reactivate current cell. So, it does things like get the particular renderer that is determined by the style.CellType for the current cell and makes sure that is the renderer that is being used in the currentcell. You would want to use this method to make sure the currentcell is properly displayed(using the proper renderer) if you do something in your code that might dynamically change how the current cell should behave (like changing a TextBox celltype to a Static celltype). Here is the source code for this method. public void Refresh() { if (IsChanging || this.IsLocked) return; Trace.Indent(); try { if (Renderer != null && !(this.inActivate || this.inDeactivate)) { GridStyleInfo style = Grid.GetViewStyleInfo(rowIndex, colIndex); GridCellRendererBase newRenderer = Grid.CellRenderers[style.CellType]; if (newRenderer != cellRenderer) { Reactivate(); return; } Renderer.Hide(); if (!IsModified) Renderer.Initialize(rowIndex, colIndex); } if (rowIndex >=0 && colIndex >= 0) Grid.InvalidateRange(GridRangeInfo.Cell(rowIndex, colIndex), GridRangeOptions.MergeAllSpannedCells); } finally { Trace.Unindent(); } }

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

;