Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - AllowNullDate not working with C#
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AllowNullDate not working with C#

 Post Reply Post Reply
Author
Message
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Topic: AllowNullDate not working with C#
    Posted: 15 August 2006 at 3:01pm
I've tried various combinations of code to try to get the AllowNullDate feature to work in C#.  No matter what I try, the date is always displayed as "30/12/1899".  The following code sample was added to the C# Property Grid sample project.
 
Below the line:
 
Item = Category.AddChildItem(PropertyItemType.PropertyItemDate, "DateItem", "26/01/2004");
 
I added the following lines:
 
Item = Category.AddChildItem(PropertyItemType.PropertyItemDate, "NullDateItem", null);
((XtremePropertyGrid.PropertyGridItemDate)Item).AllowNullDate("DateIsNull");
 
Does anyone know the trick to getting this to work in C#?
 
Thank you in advance,
 
Boyd
Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Posted: 18 August 2006 at 9:50pm
It appears you have to set the null value after you call the AllowNullDate method.
 
On a side note, you also can't specify an empty string for the AllowNullDate string value to display when it is null.  You must at least specify an empty space.
 
Odd circumstances, but it's now working.
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.