private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{
string value = numericUpDown1.Value.ToString();
int numOfDecimalPlaces = 0;
if (value.Contains("."))
{
string[] splitString = value.Split(new char[] { '.' });
numOfDecimalPlaces = splitString[1].Length;
}
numericUpDown1.DecimalPlaces = numOfDecimalPlaces;
}
ref : http://www.dreamincode.net/forums/showtopic81889.htm
Blog Archive
Tuesday, July 7, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment