Print Page | Close Window

How To Edit a Select Row and Add new row

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=4189
Printed Date: 29 April 2024 at 5:18am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How To Edit a Select Row and Add new row
Posted By: cnmmd
Subject: How To Edit a Select Row and Add new row
Date 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.




Replies:
Posted By: sserge
Date 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



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