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 General Discussion » CExtGridCellCheckBox Collapse All
Subject Author Date
Vipin Viswanathan Aug 8, 2007 - 4:42 AM

How to change the text of CExtGridCellCheckBox cell when the check state is changes

Technical Support Aug 8, 2007 - 7:47 AM

You should override the CExtGridWnd::OnGridCellSetCheck() virtual method which has a reference to the cell object and its coordinates in the parameters. You can change cell’s text using the CExtGridCell::TextSet() method.

Vipin Viswanathan Aug 14, 2007 - 1:25 AM

I have derived a class named CUserGrid from CExtGridWnd like "class CUserGrid : public CExtGridWnd " nd overrides the
OnGridCellSetCheck() function. But the overrided function is not being called when the state of the checkbx changes.

Technical Support Aug 14, 2007 - 1:27 PM


First of all please check the method declaration carefully:

      virtual void OnGridCellSetCheck(
            CExtGridCell & _cell,
            INT nCheck,
            LONG nColNo,
            LONG nRowNo,
            INT nColType,
            INT nRowType,
            const RECT & rcCellExtra,
            const RECT & rcCell
            );
Second, please let us know which cell classes are you using with the cell check box built-in inside .

Suhai Gyorgy Aug 14, 2007 - 3:43 AM

If you are using v2.80, the method signature should look like this:
    virtual void OnGridCellSetCheck(
        CExtGridCell & _cell,
        INT nCheck,
        LONG nColNo,
        LONG nRowNo,
        INT nColType,
        INT nRowType,
        const RECT & rcCellExtra,
        const RECT & rcCell
        );

If you are using some previous version, you should search for the proper signature in your ExtGridWnd.cpp file under ProfUIS source code.

Vipin Viswanathan Aug 14, 2007 - 7:11 AM

I am using 2.70, the method signature obtained from ProUIS source code looks like
virtual void OnGridCellSetCheck(
        CExtGridCell & _cell,
        INT nCheck,
        LONG nColNo,
        LONG nRowNo,
        INT nColType,
        INT nRowType,
        const RECT & rcCellExtra,
        const RECT & rcCell
        );
and is not working

Technical Support Aug 18, 2007 - 8:59 AM

Would you send us your project so we can find out what is wrong?