Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > GridView > Grid data clears on column sort

Not answered Grid data clears on column sort

Feed from this thread
  • Bhalchandra avatar

    Posted on Feb 9, 2012 (permalink)

    Hi,

    I have a grid with all default settings related with Sorting. 
    grid's ItemSource property is set to custom List<MyCalss> at run time. 
    But when i click on column's header for sorting it clears grid data.


    Thanks,
    Bala

    Reply

  • Bhalchandra avatar

    Posted on Feb 9, 2012 (permalink)

    Got the issue.
    After leaving the context, i was clearing the data source collection assigned to GridView.ItemSource something like below -

    List<MyClass> obj = new List<MyClass>;
    try
    {
    //Populate obj here.
    this.gridview.ItemSource = obj;
    }
    catch(Exception)
    {}
    finally
    {
    obj.clear(); // This was the culprit
    }

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > GridView > Grid data clears on column sort
Related resources for "Grid data clears on column sort"

WPF Grid Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]