![]() |
Selecting rows in CXTPReportControl and |
Post Reply
|
| Author | |
WilliamGS
Newbie
Joined: 18 April 2005 Location: Peru Status: Offline Points: 12 |
Post Options
Thanks(0)
Quote Reply
Topic: Selecting rows in CXTPReportControl andPosted: 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 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |