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 » Grid column resize bug/problem Collapse All
Subject Author Date
Offer Har Apr 9, 2008 - 9:51 AM

I have a tree grid with two columns. I want that each column will occupy 50% of the grid. I initialized my grid as follows, but it does not happen. The first column size stays fixed, and the second column occupy the rest of the grid. Can you please check if there is a problem in my code or a bug?


Thanks.


  

  SiwModifyStyle(
        (__ESIS_STH_NONE|__ESIS_STV_ITEM)        // Item scroll window styles
        | __EGBS_SFB_FULL_ROWS                   // Selection/focus type - full rows
        | __EGBS_DYNAMIC_RESIZING                // Resize rows/columns on-the-fly
        | __EGBS_RESIZING_CELLS_OUTER            // enable row/column resizing
        ,0, false);

    SiwModifyStyleEx(
        __EGBS_EX_CELL_TOOLTIPS_INNER
        | __EGBS_EX_CELL_EXPANDING_INNER
        | __EGWS_EX_PM_COLORS
        | __EGBS_EX_CORNER_AREAS_3D
        | __EGBS_EX_CORNER_AREAS_CURVE
        | __EGBS_EX_HVI_EVENT_CELLS
        ,0, false);

    BseModifyStyleEx(__EGBS_BSE_EX_PROPORTIONAL_COLUMN_WIDTHS);

    OuterRowCountTopSet(1, false);
    OuterRowHeightSet(true, 0, 0);
    ColumnAdd(2, false);

    CExtGridCell* pCell = NULL;
    HTREEITEM htiCurrent = NULL;

    CExtGridCellHeader* pCellHdr = NULL;
    
    pCellHdr = (CExtGridCellHeader*)GridCellGetOuterAtTop(0, 0, RUNTIME_CLASS(CExtGridCellHeader));
    pCellHdr->ExtentPercentSet(0.5);

    pCellHdr = (CExtGridCellHeader*)GridCellGetOuterAtTop(1, 0, RUNTIME_CLASS(CExtGridCellHeader));
    pCellHdr->ExtentPercentSet(0.5);

Offer Har Apr 10, 2008 - 11:26 AM

Found the problem I did have an extra ExtentSet


Thanks.

Technical Support Apr 10, 2008 - 11:07 AM

The proportional column resizing work equally for the CExtReportGridWnd, CExtTreeGridWnd and CExtGridWnd controls. This feature is completely implemented in the CExtGridWnd class. We have quickly checked the problem in the report grid with two columns and we found no problems. We know that the first column can have a persistent width only if you specified the minimal/current/maximal width in pixels in the header cell of this column using the CExtGridCell::ExtentSet() method. Only in this case the double value specified in the CExtGridCell::ExtentPercentSet() method is ignored. You told that the second column is resized. This means the proportional column resizing feature is active and working in the grid window. We don’t know any other way to freeze the first column except specifying its 3 fixed width in pixels. Please check your code additionally. If you do not find suspected assignments of all three fixed width in your code, we will try to create a smallest possible test project for you.

Offer Har Apr 10, 2008 - 11:15 AM

Thank you for the reply - I will check my code to see if an ExtentSet is called somewhere else and let you know.