Menu

Updating model object list after sorting

Help
HM
2014-05-21
2014-05-26
  • HM

    HM - 2014-05-21

    I am using ObjectListView.
    OLV does a wonderful work when sorting and updating the view object, however i would also like the model object list to be updated based on the sorting.
    Any hints will be appreciated.
    Thanks.

     
  • Phillip Piper

    Phillip Piper - 2014-05-26

    Grouping makes this a little bit difficult. When the list was grouped, how would the model object list be arranged?

    For you want exact display order, you'll have to use GetNthItemInDisplayOrder()

    for (int i = 0; i < olv.GetItemCount(); i++) {
        OLVListItem olvi = olv.GetNthItemInDisplayOrder(i);
        if (olvi != null)
            DoSomething(olvi.RowObject);
    }
    
     

Log in to post a comment.