Print Page | Close Window

Selecting rows in CXTPReportControl and

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=2125
Printed Date: 02 January 2026 at 6:23pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Selecting rows in CXTPReportControl and
Posted By: WilliamGS
Subject: Selecting rows in CXTPReportControl and
Date Posted: 18 April 2005 at 6:54pm

Hi all. I am using CXTPReportControl in a CDialog class and I have some questions, please help me. This is my code:

 

void COrgPropertiesDlg::OnPrMakeFam()

{

             CXTPReportRecord* pFamily = Report.AddRecord(new CXTPReportRecord);

             CXTPReportRecordItem* pItem = pFamily->AddItem(new CXTPReportRecordItemText(_T("New Family")));

             pItem->SetEditable(TRUE);

             pFamily->AddItem(new CXTPReportRecordItemText(_T("")));

             pFamily->AddItem(new CXTPReportRecordItemText(_T("")));

             Report.Populate();

}

 

It works fine, but I want to do this:

 

1) The new record must be selected and visible, there are functions to do this:

             CXTPReportControl::EnsureVisible(CXTPReportRow* pCheckRow);

             CXTPReportControl::GetSelectedRows()->Select(CXTPReportRow* pRow);

             But the parameter is a CXTPReportRow objetct and I do not have a CXTPReportRow objetct, I have a CXTPReportRecord object. How can I do this?

2) How can I edit the label of the new CXTPReportRecordItem? (using code, not by user action).

 

Summary:

The new row must be visible, selected and the first cell must be in edit mode, so the user can change the text.

 

Thanks in advance,

William GS




Replies:
Posted By: Oleg
Date Posted: 19 April 2005 at 7:45am

We added CXTPReportRows::Find method, and updated our sample to allow inplace edit after add new item, please wait a little for 9.70 release.

 

code from new source:

CXTPReportRow* CXTPReportRows::Find(CXTPReportRecord* pRecord)

{

for (int i = 0; i < (int)m_arrRows.GetSize(); i++)

{

if (m_arrRows.GetAt(i)->GetRecord() == pRecord)

return m_arrRows.GetAt(i);

}

return 0;

}



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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