BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
private void DataForm_Validated(object sender, ValidatedEventArgs e)
{
button.IsEnabled = (sender as SfDataForm).ItemManager.DataFormItems.TrueForAll(x => (x asDataFormItem).IsValid);
} |
Hi Davide,
Thanks for the update.
Currently we are analyzing on your query, we will analyze
and update you the further details in two business days (August 21, 2019). We
appreciate your patience until then.
Regards,
Ganeshamoorthy C
[XAML]
<dataForm:SfDataForm x:Name="dataForm" DataObject="{Binding LoginInfo}" Grid.Row="0"ValidationMode="LostFocus" CommitMode="LostFocus"/>
<Button x:Name="validateButton" Grid.Row="1" Text="Submit"
Command="{Binding Path=BindingContext.ValidateCommand, Source={x:Reference Name=dataForm}}" CommandParameter="{Binding Source={x:Reference Name=dataForm}}"/> |
[C#]
public DataFormViewModel()
{
loginInfo = new DataFormModel();
this.ValidateCommand = new Command<object>(this.OnValidate);
}
public Command<object> ValidateCommand { get; set; }
private void OnValidate(object dataForm)
{
var dataFormLayout = dataForm as Syncfusion.XForms.DataForm.SfDataForm;
dataFormLayout.Validate();
} |
Hello, how can we enable or disable the validateButton based on a boolean property on the view model?
Basically we need to somehow update the bool property on the view model with the form.Validate() result.
Hi Mihai,
We have reviewed your query, but we are unsure whether you are using SfDataForm in Xamarin.Forms or .NET MAUI. Could you please confirm? This will allow us to provide the most accurate assistance.
Regards,
Vidyalakshmi M.