AllowNullDate not working with C# |
Post Reply |
Author | |
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
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 |
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
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.
|
|
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 |