Is there a way to turn off the automatic selection of the first row in the built-in DataGrid in Silverlight?
We build a lot of functionality based off the user selecting a row in a data grid. The automatic firing of SelectionChanged when databinding or sorting is really causing us issues. We have tried to put some guards around the selection, but can’t seem get all problems covered.
For example, if you have DataGrid in a tab of a TabControl that is not shown when loading the screen and the DataGrid has a binding to a property of the DataContext that is a list of objects. The grid is not databound until the tab is shown. Is there an event telling us that the grid is databinding? Shouldn’t the default behavior of databinding be not to select a row?
Thanks
Mike
Since the code for the DataGrid was available from Microsoft, we removed the selection so we didn’t have to work around it. I believe this is no longer an issue with the Silverlight 3.0 grid.