Hi Diego,
Thank you for contacting syncfusion support.
#Regarding CustomEditor in DataForm.
We have checked the reported query from our end. We would like to inform you that you can achieve your requirements by creating the custom editor by overriding the DataFormEditor class. Please refer to the following code snippet for your reference.
Code snippet
|
dataForm.RegisterEditor("CustomEditor", new CustomTextEditor(dataForm));
dataForm.RegisterEditor("Name", "CustomEditor");
…
…
…
public class CustomTextEditor : DataFormEditor<StackLayout>
{
SfDataForm sfDataForm;
public CustomTextEditor(SfDataForm dataForm) : base(dataForm)
{
}
protected override StackLayout OnCreateEditorView(DataFormItem dataFormItem)
{
return new StackLayout();
}
protected override void OnInitializeView(DataFormItem dataFormItem, StackLayout view)
{
base.OnInitializeView(dataFormItem, view);
view.Orientation = StackOrientation.Horizontal;
var entry = new Entry();
entry.HorizontalOptions = LayoutOptions.FillAndExpand;
var button = new Button();
button.HorizontalOptions = LayoutOptions.End;
view.Children.Add(entry);
button.Text = "Search";
view.Children.Add(button);
}
} |
Please refer to the tested sample in the following location.
Please refer to the following UG Documentation link about ‘How to create a CustomEditor in a SfDataForm’.
Please let us know if you have any concern.
Regards,
SaiGanesh Sakthivel