Specifying a frozen column attribute does not lock the selected column

Article ID: 1062
Last updated: 02 Feb, 2008
Article ID: 1062
Last updated: 02 Feb, 2008
Revision: 1
Views: 2939
Posted: 18 Aug, 1998
by Dean J.
Updated: 02 Feb, 2008
by Dean J.
Problem


When a column is specified as frozen in a grid, the column does not lock against the left margin as expected.


Cause


The problem is caused by an error in the GXGridCore.java file. The error incorrectly designates the number of columns to be frozen.


Action


To correct the problem, please make the following modifications to the GXGridCore.java file(s) on your system.

Please note that you will need to correct both the jfc and the awt versions of these files.

These files can be found at:

   ...com
oguewavegridawtv2_0...

or

   ...com
oguewavegridjfcv2_0...

Change the methods below to reflect the indicated changes.

public void frozenRows(int nFrom, int nTo) {
        int nFrozenRow = Math.max(nFrom, nTo);
        if (nFrozenRowgetRowCount()) return;

        m_gxParam.setFrozenRowIndex(nFrozenRow);
        storeMoveRows(nFrom, nTo, getHeaderRows()-1);
        setFrozenRows(getHeaderRows()+nTo-nFrom +1);  // Add one to the current count

        update();
    }


public void frozenCols(int nFrom, int nTo) {

        int nFrozenCol = Math.max(nFrom, nTo);
        if (nFrozenColgetColCount()) return;

        m_gxParam.setFrozenColIndex(nFrozenCol);
        storeMoveCols(nFrom, nTo, getHeaderCols()-1);
        setFrozenCols(getHeaderCols()+nTo-nFrom +1);  // Add one to the current count

        update();
    }

After making these modifications, you will need to recompile the GXGridCore file(s) and then recompile your application or applet. You will find after making these modifications that the grid locks the columns correctly.


This article was:   Helpful | Not helpful
Report an issue
Article ID: 1062
Last updated: 02 Feb, 2008
Revision: 1
Views: 2939
Posted: 18 Aug, 1998 by Dean J.
Updated: 02 Feb, 2008 by Dean J.

Others in this category