Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - How To Edit a Select Row and Add new row
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How To Edit a Select Row and Add new row

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


Joined: 09 May 2006
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote cnmmd Quote  Post ReplyReply Direct Link To This Post Topic: How To Edit a Select Row and Add new row
    Posted: 10 May 2006 at 11:27pm

CXTPReportControl,a single list,now I hope edit a select row,can edit,can show a button,then out a window.

I hope add a new row too.

there is no sample of this.

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2006 at 4:28pm
Hi,

There is an example in ReportSample application:

void CTaskListView::OnAddTask()
{
    CTaskRecord* pRecord = (CTaskRecord*)GetReportCtrl().AddRecord(new CTaskRecord(TRUE, taskImportanceNormal, FALSE, taskStatusNotStarted, _T(""), COleDateTime(), 0, _T("")));
    GetReportCtrl().Populate();

    CXTPReportRow* pRow = GetReportCtrl().GetRows()->Find(pRecord);
    if (pRow)
    {           
        XTP_REPORTRECORDITEM_ARGS itemArgs(&GetReportCtrl(), pRow, GetReportCtrl().GetColumns()->Find(COLUMN_SUBJECT));
        GetReportCtrl().EditItem(&itemArgs);
    }
}


First 2 lines of the method adds a new record, then it shows how to programmatically start row editing (it chooses just added row).

--
WBR,
Serge
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.156 seconds.