This project is read-only.

How do I remove a controller?

Apr 8, 2009 at 2:16 PM
I am adding a controller to make my grid cells unselectable like this in a base class that all my grids inherit.

SourceGrid.Cells.Controllers.Unselectable unselectableController = new SourceGrid.Cells.Controllers.Unselectable();

However one of the derived grids needs to be selectable, is there a way I can remove the controller in that derived class?

Apr 8, 2009 at 2:26 PM
Sorry, again as soon as I put the question up I find the answer.  I really must try harder before asking a question but I honestly had been trying for a while before posting.

The answer for anyone looking for it is:

Type unselectable = typeof(SourceGrid.Cells.Controllers.Unselectable);
SourceGrid.Cells.Controllers.IController unselectableController = this.Controller.FindController(unselectable);