sorting - How can you change the initial sort direction when clicking on a header in a WPF DataGrid? -


we have datagrid displays readonly checkbox column, bound isselected property. have user sorting turned on , works, toggling sort order when user repeatedly clicks on column header.

the issue we're trying overcome initial sort order when user first clicks on column. way works now, when first click it, sorts unchecked ones first, checked ones checked ones ones user interested in, meaning have click twice.

we want reverse, first click puts selected items top. possible? know can add inverted isnotselected property viewmodel , make sorting path, i'd rather not if can avoid it.

by using collectionview datagrid can implement custom sorting. allow specify default sorting require without having play inverse property values. here's link basic examples: https://msdn.microsoft.com/en-us/library/ff407126%28v=vs.110%29.aspx


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -