FlexGrid sort

Posted by: Ranba790 on 3 September 2018, 4:56 am EST

  • Posted 3 September 2018, 4:56 am EST

    Hi.

    For some strange reason, the sort feature when clicking the column header is not working.

    I have :

    .AllowSorting = C1.Win.C1FlexGrid.AllowSortingEnum.SingleColumn

    and

    Col(i).AlowSort = True.

    The grid is in a bound mode to a data table, The AllowFilter is also set to true and working properly.

    Any idea what am I missing.

    Thanks

  • Posted 3 September 2018, 6:12 am EST

    Hi,

    I could not replicate your issue at my end. I’ve attached the sample I used to replicate the issue.

    Please see if you still have the same problem with this sample. If the sample works correctly then please modify it so I can further investigate the problem.

    Regards.

    FlexGridSortVB.zip

  • Posted 6 September 2018, 5:34 am EST

    Hi

    I am unable to simulate it, I took the example and try to make it as close as possible to my project but it works ok in the sample, I think it might be related somehow to the data feeding the grid, It used to work ok before I switched to bound mode(the table used to be populated in an unbound mode), if you have any idea how I can troubleshoot this issue it will be much appreciated

    thanks

  • Posted 7 September 2018, 2:21 am EST

    Hi,

    The only reasons for sorting to not work can be:

    1. Using bound and unbound columns, in which case sorting does not work for unbound column.
    2. Using a List as Data Source of FlexGrid. See this link to solve this problem:

      https://www.grapecity.com/en/blogs/sort-c1flexgrid-bound-to-a-bindinglist

    If you’re using a DataTable as DataSource, can you please send a small sample replicating the issue so I can investigate this further?

    Thanks.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels