Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGrid can't sort IObservable column #2802

Open
aguahombre opened this issue Jul 31, 2019 · 1 comment
Open

DataGrid can't sort IObservable column #2802

aguahombre opened this issue Jul 31, 2019 · 1 comment

Comments

@aguahombre
Copy link
Contributor

v0.8.1
If I bind a DataGrid column to an IObservable property, I cannot sort the column data by clicking the column header.

In the example, the data cannot be sorted by the Stations column which is bound to an IObservable<string> property.

<DataGrid Grid.Row="0" Name="countries" Items="{Binding Countries}">
  <DataGrid.Columns>
	<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*" />
	<DataGridTextColumn Header="Stations" Binding="{Binding Stations^}" Width="4*" IsReadOnly="True" />
  </DataGrid.Columns>
</DataGrid>
@FloridaMatt
Copy link

FloridaMatt commented Jun 5, 2020

I'm seeing a similar behavior. This is on 0.9.10

First, when I add items to the bound IObservableCollection, they appear in inverse order.

Then, when I click any column header, the grid is sorted on the first column.

Except, the last item I added to the collection is always in the first row, while all the remaining rows are sorted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants