I have a property for another control that is based on whether or not there are any SelectedItems in a grid. When I initially set the Items to the datasource, the SelectedItems collection contains the first row. Consequently, property is being set incorrectly. Not only that, but the row is not even selected in the grid visually. This to me is incorrect behavior.
I would think the expected behavior to be:
1. Set the DataSource -> SelectedItems = 0
2. Select one or more rows in the grid -> SelectedItems = however many rows were selected.
What property do I need to check that will contain the count of rows that have been selected by the user, and show 0 if nothing has been selected? I'm already aware of the SelectionChanged event and I'm using it, but the grid in the codebehind does not match the state of the grid being displayed to the user.
??
I would think the expected behavior to be:
1. Set the DataSource -> SelectedItems = 0
2. Select one or more rows in the grid -> SelectedItems = however many rows were selected.
What property do I need to check that will contain the count of rows that have been selected by the user, and show 0 if nothing has been selected? I'm already aware of the SelectionChanged event and I'm using it, but the grid in the codebehind does not match the state of the grid being displayed to the user.
??