Selected Item of Visuual Collection is not set in LightSwitch while changing the selection in Screen

1.2k Views Asked by At

I created a lightswitch control extension for Silverlight control that bounds to a collection. (like DataGrid)

It correctly shows data on a screen, but the underlying query's SelectedItem property is not getting updated when I select a row in the grid. When I use a LS DataGrid it works as expected.

What am guessing is, i need to bind the selected item of table and My Collection Control.

How can i do this in my extension itself??

Thanks..

1

There are 1 best solutions below

0
On BEST ANSWER

Have you set the mode to two way?

SelectedItem="{Binding Screen.CreatedProperty, Mode=TwoWay}

this might help as well in you screen code:

 partial void ResponsibleRoles_SelectionChanged()
    {
        if (this.query.SelectedItem != null)
            Property = this.query.SelectedItem.field;
    }