Max and Min Date for Datetime Control in Grid for .Net

Article ID: 750
Last updated: 05 Jan, 2012
Article ID: 750
Last updated: 05 Jan, 2012
Revision: 1
Views: 1798
Posted: 29 Dec, 2005
by Meltreger B.
Updated: 05 Jan, 2012
by Meltreger B.
Problem

 User needs to set the Max and Min date values for DateTime control type in Grid for .Net




Cause




Action

One can accomplish this using User attributes as follows:

 

Style style = new Style();

style.Control = Stingray.Grid.ControlType.DateTime;

style.set_UserAttribute(UserAttributeID.DATEMIN,"1/1/2000");

style.set_UserAttribute(UserAttributeID.DATEMAX,"1/1/2005");

style.set_UserAttribute(UserAttributeID.DATEVALIDMODE,"2");

gridControl1.SetStyleRange(Range.Cell(1,1),style); 


This article was:   Helpful | Not helpful
Report an issue
Article ID: 750
Last updated: 05 Jan, 2012
Revision: 1
Views: 1798
Posted: 29 Dec, 2005 by Meltreger B.
Updated: 05 Jan, 2012 by Meltreger B.

Others in this category