3 Replies Latest reply on Jul 26, 2007 6:30 AM by dolinja

    Bug in AdvancedDataGridColumn.sortDescending

    dolinja
      It seems that AdvancedDataGridColumn.sortDescending always returns false, even when you have sorted a column in descending order. My project has a bit of logic revolving around this property on DataGridColumn, but we are porting everything to AdvancedDataGridColumn (thus it is broken now). Is this a known bug, and is there any workaround?

      Thanks!
      Jason
        • 1. Re: Bug in AdvancedDataGridColumn.sortDescending
          Peter deHaan Level 4
          Jason,

          Can you please file a bug in the bugbase and we can investigate the issue.

          https://bugs.adobe.com/flex/
          Project: Flex Data Visualization Components
          Components: Advanced Data Grid

          Thanks,

          Peter
          • 2. Re: Bug in AdvancedDataGridColumn.sortDescending
            Sreenivas R Adobe Employee
            AdvancedDataGridColumn.sortDescending is a property to control the fresh sorting behavior of the column. The default behavior on a fresh (first) sort is to sort the column in ascending order. By setting this flag to true we can get the column to sort in descending order. This property would not reflect the current column sorting order.

            The AdvancedDataGrid.getFieldSortInfo API can be used to know the current sort status of a column. Please note that this API works only if the columns data field is being used for sorting the collection. You can override this method to get more customized behavior for columns with custom sorting without a data field.
            • 3. Re: Bug in AdvancedDataGridColumn.sortDescending
              dolinja Level 1
              quote:

              Originally posted by: Sreenivas R
              AdvancedDataGridColumn.sortDescending is a property to control the fresh sorting behavior of the column. The default behavior on a fresh (first) sort is to sort the column in ascending order. By setting this flag to true we can get the column to sort in descending order. This property would not reflect the current column sorting order.



              Ok, I'll try the getFieldSortInfo. However in the plain DataGrid and DataGridColumn, sortDescending actually returns true or false given the current sort state of the column. Additionally, this behavior makes sense. What you are saying is that sortDescending only returns true if it was programmatically set in ActionScript, but isn't updated if the column is sorted by a user clicking on the grid header. This doesn't make a lot of sense to me.

              Is this a specific departure from the vanilla DataGridColumn, or is this really a bug?

              Thanks!
              Jason