public override void UpdateData(ScrollViewCell cell) { _isNumeric = variableInfo.fieldInfo.FieldType.IsNumericType(); _inputCell = (BaseInputCell)cell; _inputCell.OnValueChanged = OnValueChanged; _inputCell.SetInput(GetFieldValueAsString()); _inputCell.SetIsNumeric(_isNumeric); }
void OnValueChanged(BaseInputCell cell, string value) { if (string.IsNullOrEmpty(value) && _isNumeric) { _inputCell.SetInput(GetFieldValueAsString()); return; } else { try { variableInfo.fieldInfo.SetValue(command, Convert.ChangeType(value, variableInfo.fieldInfo.FieldType)); base.OnValueChanged(); } catch { _inputCell.SetInput(GetFieldValueAsString()); } } }