Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Selecting rows in CXTPReportControl and
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Selecting rows in CXTPReportControl and

 Post Reply Post Reply
Author
Message
WilliamGS View Drop Down
Newbie
Newbie


Joined: 18 April 2005
Location: Peru
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote WilliamGS Quote  Post ReplyReply Direct Link To This Post Topic: Selecting rows in CXTPReportControl and
    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

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.