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

Hiding controls in the Grid until activated

Is there a way to make the controls in the cell not visible until the user activated the cell? Something like the Property Window in VS.NET.

4 Replies

Administrator May 27, 2004 12:05 PM UTC

You can hide buttons by setting the style.ShowButtons property for the cells. Is this what you mean by hiding the control?

Administrator May 27, 2004 01:10 PM UTC

Yes this is what I am looking for. Is this apply to all the build in controls? combo box, checkbox, etc... Or is this only apply to button?

Administrator May 27, 2004 01:20 PM UTC

It applies to buttons only, but does include the ComboBox button, pushbutton and any other cell buttons you might be using. It will not hide a checkbox. If you want to hide checkboxes, then you could set all the celltypes to be "Static", and then handle PrepareViewStyleInfo. In your handler, if e.RowIndex and e.ColIndex point to grid.CurrentCell.RowIndex and grid.CurrentCell.ColIndex, you could then try setting e.Style.CellType to be whatever control you want in that row and column. (I mention PrepareViewStyleInfo here, but am not sure whther you would need to handle model.QueryCellInfo instead. But I think one or the other of these events should work to handle this.)

Administrator May 27, 2004 02:53 PM UTC

Clay, thank you very much. You help me to solve many of my problems very quick. I enjoy posting my issues in this forum. The turnaround time is great. -patrick
Loader.
Live Chat Icon For mobile
Up arrow icon