Skip to main content

Bindinglist.Insert

Comments

1 comment

  • Dapfor Team

    Hello,

    Binding lists indexing may not match the indexing grid. For this there are many reasons. Binding lists don’t support filtering, hierarchy, grouping etc. Also the same binding list can be connected to different grids having different filtering, sorting, grouping... Therefore adding data to the beginning or to the end of the binding list will get the same result. The easiest solution to display latest news in first rows is to sort them by time (you can hide this column if you want). The second solution – subscribe for Grid.RowAdded event and set Row.ChildIndex to zero:

    grid.RowAdded += delegate(object sender, GridRowEventArgs e) 
    {
        e.Row. ChildIndex = 0;
    };

     

    For performance reasons add data to the end of the BindingList.

    Best regards,
    Dapfor

    0

Please sign in to leave a comment.

Powered by Zendesk