Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
415
Sorting Rows With Cardview
posted

Hi,

Im using the wingrid with a cardview layout. 

I want to assign each row in the cardview a displayorder field, then have left & right buttons that will switch this value between different rows, to give the user the impression that each row is being moved.  However even though i have added the displayorder column to the sortedcolumns the sort does not take effect.

 Am i missing something here?

 

Parents
No Data
Reply
  • 469350
    Offline posted

    What exactly are you doing to"move" the cards? If you simply set the value of the DisplayOrder column, that will not refresh the sorting. You have to call band.SortedColumns.Refresh. The grid doesn't automatically refresh the sorting when a value in a cell changes because it would be a little jarring for the user to change the value of a cell, tab out of that cell, and suddenly have the grid scroll the row to a new position. 

    You may want to consider using the grid.Rows.Move method rather than using a hidden column. 

Children
No Data