in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Sorting in a FlexGrid

Last post 09-11-2007 9:29 AM by pgagnon. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-11-2007 9:29 AM

    Sorting in a FlexGrid

    Hello everyone,

    I've recently had some problems while sorting rows in a FlexGrid component. I've got 3 columns: An Id -Cols(0) , a description - Cols(1) and a sequence Cols(2) columns. I've also joined two buttons (up-down) to move items up or down in the grid. I did binf my grid to a DataTable property which works perfectly and I applied a sort order as:

    Me.MyGrid.AllowSorting = C1.Win.C1FlexGrid.AllowSortingEnum.SingleColumn
    Me.MyGrid.Sort(C1.Win.C1FlexGrid.SortFlags.Ascending, 2)

    Everytime i need to change order, i only have to specify new values in column "Sequence" like:
    Me.MyGrid.SetData(MyGrid.Row.Index, "Sequence_NUM", intNewSequence)

    There is a problem with all this: the grid does not apply sorting order until I click somewhere in the grid. Is there a way to force visual sort refresh so my rows will always be in correct order according to Sequence_NUM column?

    Thanks for all,
    Pat

    Filed under:
Page 1 of 1 (1 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.