in

C1 Community

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

FlexGrid sorting throws off bound data

Last post 01-28-2008 1:52 PM by C1_DaveT. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-25-2008 9:49 AM

    • lterry
    • Not Ranked
    • Joined on 01-16-2008
    • Posts 5

    FlexGrid sorting throws off bound data

    Hello,  I have my FlexGrid bound to a DataTable.  I am able to edit, add and remove columns without issue.  But once I start sorting on any of the columns all of the functionality gets screwed up.  For example, after sorting, if I try to add a new row it will append to the top of the FlexGrid if in ascending order.   Also, after editing a cell my code automatically updates another column in the same row as that cell, but after sorting it updates the incorrect row.

    I have read similar posts from a few years back none of them came to any conclusion.

    Is this a bug or is there a fix?

     Thank you,

    Lindsay

    Filed under: ,
  • 01-28-2008 1:52 PM In reply to

    Re: FlexGrid sorting throws off bound data

    Hi Lindsay,
     
    I think you are seeing the behavior because sorting works differently depending on whether the grid is bound to a data source or not.In bound mode, the grid passes the sort request to the underlying data source object. In this case, the sort settings remain in effect as the grid data changes. Editing values in the sort column will cause the data source to re-sort the data, and grid will show the changes automatically. This is equivalent to setting the Sort property on a Data.DataView object for example.
     
    Regards,
    -Dave
     
    <lterry> wrote in message news:201345@10.0.1.98...

    Hello,  I have my FlexGrid bound to a DataTable.  I am able to edit, add and remove columns without issue.  But once I start sorting on any of the columns all of the functionality gets screwed up.  For example, after sorting, if I try to add a new row it will append to the top of the FlexGrid if in ascending order.   Also, after editing a cell my code automatically updates another column in the same row as that cell, but after sorting it updates the incorrect row.

    I have read similar posts from a few years back none of them came to any conclusion.

    Is this a bug or is there a fix?

     Thank you,

    Lindsay



    http://helpcentral.componentone.com/cs/forums/p/74117/201345.aspx#201345

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