Print Page | Close Window

Add a date item with NULL-Date

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=12935
Printed Date: 03 May 2024 at 12:15pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Add a date item with NULL-Date
Posted By: BerntK
Subject: Add a date item with NULL-Date
Date Posted: 15 December 2008 at 5:27pm
Hi,
I would like to add a date item with initial NULL-date (dtDate.SetStatus(COleDateTime::null)).


pDate = (CXTPPropertyGridItemDate*) pGroupItem->AddChildItem(new CXTPPropertyGridItemDate (_T("Date\nDate"), dtDate,&dtDate));


CXTPPropertyGridItemDate::SetDate asserts as there is no way to preset the m_strNullValue as it is done by CXTPPropertyGridItemDate::AllowNullDate .

Any ideas?


Bernt








Replies:
Posted By: Oleg
Date Posted: 16 December 2008 at 2:07am
Hi,
 
Set some non NULL date first and then call AllowNullDate  + SetDate(dtDate).


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


Posted By: BerntK
Date Posted: 16 December 2008 at 3:41am
Hi,

...thats not straight ahead.

I tried a derived class, overwriting SetDate(), but forgot that within the constructor, the baseclass of SetDate() is called...

Any other ideas?

Bernt



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