Print Page | Close Window

Click event of CXTPReportControl

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4082
Printed Date: 12 July 2025 at 11:53am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Click event of CXTPReportControl
Posted By: Suyambu2002
Subject: Click event of CXTPReportControl
Date Posted: 28 April 2006 at 1:13am

Hello All

Am using CXTPReportControl as follows...

 m_xtReport.ModifyStyle ( NULL, WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_TABSTOP );
  m_xtReport.GetReportHeader ( )->AllowColumnRemove ( FALSE );
  m_xtReport.GetReportHeader ( )->AllowColumnReorder ( FALSE );
  m_xtReport.GetReportHeader ( )->AllowColumnSort ( TRUE );
  
  //m_xtReport.GetReportHeader ( )->SetAutoColumnSizing ( FALSE );
  m_xtReport.EnableScrollBar ( SB_HORZ, TRUE );
  
  CXTPReportColumn* pFieldColumn = m_xtReport.AddColumn ( new CXTPReportColumn ( IDN_SELECT_FIELD_NAME, SELECT_FIELD, 200 ) );
  CXTPReportColumn* pValueColumn = m_xtReport.AddColumn ( new CXTPReportColumn ( IDN_ENTER_DEFAULT_VALUES, ENTER_DEFAULT_VALUE, 200 ) );
  
  if ( pFieldColumn )
  {
   pFieldColumn->GetEditOptions ( )->m_bAllowEdit = FALSE;
  }
  
  if ( pValueColumn )
  {
   for ( iIter = 0; iIter < _countof ( szRGUserFieldsArr ); iIter++ )
   {
    pValueColumn->GetEditOptions ( )->AddConstraint ( _T ( szRGUserFieldsArr[iIter] ), iIter );
   }
   pValueColumn->GetEditOptions ( )->m_bConstraintEdit = FALSE;
   pValueColumn->GetEditOptions ( )->m_bAllowEdit = TRUE;
   pValueColumn->GetEditOptions ( )->m_bSelectTextOnEdit = TRUE;
   pValueColumn->GetEditOptions ( )->m_nMaxLength = MAX_TEXT_RANGE;
   pValueColumn->GetEditOptions ( )->AddComboButton ( );
  }

 

Now report control will two columns column one non editable and column two editable with combo box.  By default all the column two data will be "Click-Here-To-Map".  When I select some row on the second column, "Click-Here-To-Map" will be highlighted as if the user is going to edit it.   Now when I press delete button the data will be blank in the column.  Assume I am going to someother row, now what should happen is the previous column should fill up with "Click-Here-To-Map", since the user has not entered anything.

How to get the click event on the report control???

 



-------------
Best Regards
Suyambu



Replies:
Posted By: sserge
Date Posted: 28 April 2006 at 3:59pm
Hi,

What's a problem with handling XTP_ID_REPORT_CONTROL notification?

ON_NOTIFY(NM_CLICK, XTP_ID_REPORT_CONTROL, OnReportItemClick)
....

void CYourView::OnReportItemClick(NMHDR * pNotifyStruct, LRESULT * /*result*/)
{
    XTP_NM_REPORTRECORDITEM* pItemNotify = (XTP_NM_REPORTRECORDITEM*) pNotifyStruct;
   
....
}


--
WBR,
Serge


Posted By: Suyambu2002
Date Posted: 02 May 2006 at 2:41pm

Hi Serge

Thanks a lot for your reply.

Click event would not help me.

As I told earlier, I would like to set some default value if the user is not selecting anything from the combo box.

When I select some row on the second column, "Click-Here-To-Map" will be highlighted as if the user is going to edit it.   Now when I press delete button the data will be blank in the column.  Assume I am going to someother row, now what should happen is the previous column should fill up with "Click-Here-To-Map", since the user has not entered anything.

Any assitance would be helpfull.



-------------
Best Regards
Suyambu



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net