public void SetValue(JsValue arg) { switch (arg.Type) { case Types.Boolean: Cell.SetCellValue(arg.AsBoolean()); break; case Types.String: Cell.SetCellValue(arg.AsString()); break; case Types.Number: Cell.SetCellValue(arg.AsNumber()); break; case Types.Object: if (arg.IsDate()) { Cell.SetCellValue(arg.AsDate().ToDateTime()); } else { double?value = arg.ConvertToDouble(); if (value.HasValue) { Cell.SetCellValue(value.Value); } else { Cell.SetCellValue((string)null); } } break; default: Cell.SetCellValue((string)null); break; } }
public override void SetValue(JsValue value) { ((SimpleNumericTextBox)Control).Value = (decimal)value.ConvertToDouble(); }