Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Bug in sorting in trees in 2.84 ***URGENT*** Collapse All
Subject Author Date
Offer Har Nov 3, 2008 - 7:26 AM

Dear support,


We must have the sorting available for a very important customer.


The sorting works from the column header when the user clicks on it, but when calling



OnGridQueryDataProvider().SortOrderUpdate(false, this);

As we do in grids for sorting from code when we add rows, it does not work. It gets to this empty function:

bool CExtTreeGridDataProvider::SortOrderUpdate(
    bool bColumns, // true = sort order for columns, false - for rows
    IDataProviderEvents * pDPE // = NULL
    )
{
    ASSERT_VALID( this );
    bColumns;
    pDPE;
    // this method must never be invoked
//    ASSERT( FALSE );
    return true;
}


Please fix, or explain how to sort the tree from the code. In any case, we think the sorting should be the same in grid and tree, so this function must be implemented in trees as well.


Thanks,


Ron.

Technical Support Nov 6, 2008 - 1:10 PM

You should initialize an CExtGridDataSortOrder array of column indices with their ascending flags and invoke the CExtTreeGridWnd::TreeGridSortOrderSetup() method. This method in a tree grid is similar to the CExtGridWnd::GridSortOrderSetup() method in plain grid (see in 2.83 documentation). Both methods do their grids sorting and setup sort arrows in header columns.

Offer Har Nov 4, 2008 - 7:59 AM

I don’t understand - how do I tell the tree to re-sort itself like I do to a grid? this function  requiresItemSortChildrenDeep many parameters that I have no idea why and what they mean.


In a grid I just call SortOrderUpdate - what is the matching function in trees?


I got the latest code of 2,84 and did not see any change in tree between the version I was using in the sort part.


Please help me with this ASAP, we need to release a version.

Technical Support Nov 3, 2008 - 1:17 PM

We finished our work on tree grid sorting in Prof-UIS 2.84. The tree grid in the FilteredGrids sample application is sort-able. By default the tree grid sorts all the items at all the tree levels using a new CExtTreeGridWnd::ItemSortChildrenDeep() method. It’s possible to make it sorting only some of levels by overriding a new CExtTreeGridWnd::TreeGridSortOrderSetup() virtual method. The methods referred in your message were completely re-coded. We sent you a link to the updated source code by email.

Offer Har Nov 5, 2008 - 5:06 AM

Please answer my questions from yesterday - we still did not resolve this issue and we need it ASAP.

Offer Har Nov 4, 2008 - 8:01 AM

What is CExtGridDataSortOrder? where do I get it from? What do I do with it?

Technical Support Nov 6, 2008 - 1:09 PM

This class implements an array of data structures containing pair of values:
- column index to sort by
- flag indicating whether a column with index should be sorted ascending

Offer Har Nov 4, 2008 - 7:59 AM

I don’t understand - how do I tell the tree to re-sort itself like I do to a grid? this function  requiresItemSortChildrenDeep many parameters that I have no idea why and what they mean.


In a grid I just call SortOrderUpdate - what is the matching function in trees?


I got the latest code of 2,84 and did not see any change in tree between the version I was using in the sort part.


Please help me with this ASAP, we need to release a version.