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 » Using CExtGridCellButton in Grid Control Collapse All
Subject Author Date
Simp S Jul 31, 2009 - 3:05 AM

Hi,


I am using the following code for inserting ’Button’ cell on Grid Control.


**************************************************************************


    CExtGridCellButton * pCellButton =

        STATIC_DOWNCAST(

            CExtGridCellButton,

            m_wndGrid.GridCellGet( nColNo, 0L )

            );

    pCellButton->TextSet( _T("Details") );

    pCellButton->ModifyStyle( __EGCS_TA_HORZ_CENTER );

    pCellButton->IconIndexSet(0 );


**************************************************************************


How can I get the event on button click?

Technical Support Aug 2, 2009 - 1:15 PM

You should use a custom CExtGridCellButton-derived class that implements the CExtGridCell::OnButtonPressed() virtual method. Please read the following important F.A.Q. first:

http://www.prof-uis.com/prof-uis/tech-support/faq/data-grid.aspx#i-derived-a-class-from-cextgridcell-but-it-fails-to-be-compiled-what-may-be-wrong