How to hook up to an event in a custom control for a cell in a Lightswitch data grid? RRS feed

  • Question

  • Hi,

    I want to hook up some code in the Lightswitch screen code to an event on a custom control in a data grid.

    Any tips?

    The trick is that the control is in a cell in a Lightswitch data grid.  So as I understand it, there are many instances of my control at runtime.  I want to wire some code to the events in all of them.

    This is what I tried.  It throws an exception saying the ControlAvailable event is not actually available on controls inside a collection.

                var myControl = this.FindControlInCollection("ControlName", MyDataEntity.SelectedItem);
                myControl.ControlAvailable += myControl_ControlAvailable;

    • Edited by nickmiller Wednesday, February 20, 2013 6:58 AM
    Wednesday, February 20, 2013 6:57 AM