c# - How do I refresh a bound GridView after the ObservableCollection<T> has be sorted? -


the implementation refresh button. use .clear() empty list, add in latest data. after data loaded use following function sort list:

public void sortbydate()     {         this.ocol = new observablecollection<ocol>(this.ocol.orderbydescending(mydate => mydate));     } 

the gridview refreshes information add it, when run sortbydate() function, gridview not refresh reflect new order. need differently?

you need raise propertychanged event property backed ocol. have changed collection , framework still databinding old collection.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -