Unable to get MultilineText editor to expand to more than one line

Hi,

I am trying to show a multiline text field, my understanding is it will expand as the user enters new lines. Currently users can enter multiple lines of text but only see the last line. Below is my attempt as it stands.

Am I close or going the wrong way about it.


            dataForm.RegisterEditor("MultilineText", new CustomTextEditor(dataForm));
            dataForm.RegisterEditor("Comment", "MultilineText");



    public class CustomTextEditor : DataFormMultiLineTextEditor
    {
        public CustomTextEditor(SfDataForm dataForm) : base(dataForm)
        {
        }

        protected override void OnInitializeView(DataFormItem dataFormItem, Editor view)
        {
            view.VerticalOptions = LayoutOptions.FillAndExpand;
            base.OnInitializeView(dataFormItem, view);
        }
    }

Thanks
Richard


5 Replies

DY Deivaselvan Y Syncfusion Team August 22, 2018 09:55 AM UTC

Hi Richard,

Thank you for contacting Syncfusion support.

As of now we don’t have direct support to resize the Multiline text editor size height based on dataform item height, instead you can achieve your requirement by setting the RowSpan property value to the DataFormItem. 

Code snippet: 

private string firstName; 

[DisplayOptions(RowSpan = 2)] 

public string FirstName 

{ 

    get { return this.firstName; } 

    set 

    { 

        this.firstName = value; 

    } 

} 


Please refer the below link for more details.
https://help.syncfusion.com/xamarin/sfdataform/layout#spanning-rows-and-columns

We have already logged feature task for spanning the Height of MultiLineEditor based on Text.We have added it to our feature request list. We will implement this feature in any of our upcoming volume release.

Regards,
Deivaselvan



BE Ben August 22, 2018 09:03 PM UTC

Hi,

Thank you, that works perfectly.


DY Deivaselvan Y Syncfusion Team August 23, 2018 06:47 AM UTC

Hi Richard,

We are happy to know that you have achieved your requirement with the given details. Please let us know if you require any further assistance.

Regards,
Deivaselvan



JN Jayaleshwari N Syncfusion Team December 11, 2018 09:07 AM UTC

Hi Richard,   
   
We are glad to announce that our Essential Studio 2018 Volume 4 beta Release v16.4.0.40 is rolled out and is available for download under the following link.    
    
     
Support to increase or decrease the height based on text in Multiline Text editor. has been provided and included in this release .We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.    
    
Regards,    
Jayaleshwari N. 



SG Swathi Gopal Syncfusion Team December 18, 2018 01:02 PM UTC

Hi Richard, 
 
We are glad to announce that our Essential Studio 2018 Volume 4 Release v16.4.0.42 is rolled out and is available for download under the following link. 
  
  
Support to increase or decrease the height based on text in Multiline Text editor has been provided in SfDataForm and included in this release. Kindly find the simple sample for the provided support below, 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance
  
Regards, 
Swathi G 


Loader.
Up arrow icon