Hello,
I have an embedded editor in an UltraWinGrid and would like to know if it possible to hide the control.
I know I can set the cell's hidden value to false but this does not give me the desired affect as we have other functionality that no longer functions if the cell is hidden.
Below is an example piece of code I tried and while it does return to me the RenderingControl setting Visible = false has no affect. Also, we have no EditorControl on this form as it is not needed.
MyControlContainer myControlContainer = (MyControlContainer)ultraGridCellPlayerName.Editor;MyControl myControl = (MyControl)myControlContainer.RenderingControl;myControl.Visible = false;
Thanks in advance!
Ah yes, that was foolish of me. I didn't realize I was creating a new instance each time and fixed the code. I am good now. Thanks!
Are you reusing the same instance of the controls or creating new ones all the time? If you aren't using the same instance of the control, then that might solve the issue with leaking memory. If you do need to continually use a new instance, you might need to dispose the controls when they are no longer in use.
I've actually noticed an issue with this approach.
Setting the Editor or RenderingControl = null does not remove the user object.
In my form it is possible for the user to refresh the grid and we are seeing user object count spikes.
How can I remove the user object?
The rendering control gets hidden when the user drags the cell to another grid. We have no editing control as the control is read only.
I am currently using the following code to remove the rendering control which works and appears to provide good performance, just wasn't sure if there was something I was missing.
ultraGridCell.Editor = null; ultraGridCell.Value = null; ultraGridCell.Appearance.BorderColor = Color.Empty; //we are changing the border of cells which contain a control.
Our grid is like a large checkerboard and uses CellSelect ClickActionType.
Most of the cells have a control in them.
The biggest thing I noticed when the cell was hidden is that we could no longer click on it, we have a right click context menu as well as multi cell select by dragging the mouse so we'd like the user to be able to click anywhere in the grid.