We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Set a single string-based value to readonly=true / editable = false


I am struggling a little bit with the SfDataForm. I have a simple DataForm with different values like a login username. I want to display that value in the DataForm, but I want to disable that this field is editable, so that you can not focus the value and start to edit it. I want something like that a textinput is disabled, you can not focus it and can not start editing the value. I tried to play around with the annotations like ReadOnly and Editable, but it seems that they affect exactly nothing. Is there somebody that can help me?

Regards Christian

        [Display(Name = "Login username")]
        public string LoginUser
                return _loginUser;
                _loginUser = value;

4 Replies

IR Indumathi Ravichandran Syncfusion Team March 5, 2019 02:03 PM UTC

Hi Christian, 
Thank you for contacting Syncfusion support. 
We have analyzed your query “Want to disable a field in dataform and restrict the field from editing” and you can achieve this by setting ReadOnly as true. Also, you must set Editable as False in your sample. As of now we have faced issue with this in our latest version (v16.4.0.54) and we already found fixed this issue. The issue fix will be included in our upcoming 2019 Volume 1 release which is expected to roll out at the mid of March 2019. We appreciate your patience, until then you can use 
Arun Siva R 

CB Christian Bender March 5, 2019 02:14 PM UTC

Hello Arun,

thank you for your answer, it works as expected :-).


SP Subburaj Pandian Veluchamy Syncfusion Team March 6, 2019 07:18 AM UTC

Hi Christian, 
Thank you for the update. We are happy that you have meet your requirement. 
Please let us know, if you need any further assistance. 
Subburaj Pandian V 

DY Deivaselvan Y Syncfusion Team March 15, 2019 12:01 PM UTC

Hi Christian,

We are glad to announce that our 2019 Volume 1 Beta Release v17.1.0.32 is rolled out and is available for download under the following link.


The fix for the reported issue has been included in this release. The main release 2019 Volume 1 is planned to roll out at the end of March 2019.

Thanks for your patience and kindly let us know if you have any concerns.


Live Chat Icon For mobile
Up arrow icon