void spin_ValueChanged(object sender, EventArgs e)
{
Gtk.SpinButton spin = (SpinButton) sender;
object newValue = Convert.ChangeType (spin.Value, parentRow.PropertyDescriptor.PropertyType);
parentRow.PropertyValue = newValue;
//if there's an error such as out-of-range, and value not accepted by parent, restore old value
if (parentRow.PropertyValue != newValue)
spin.Value = Convert.ToDouble (parentRow.PropertyValue);
}