- Home
- Forum
- Xamarin.Forms
- Set a single string-based value to readonly=true / editable = false
Set a single string-based value to readonly=true / editable = false
Hello,
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")]
[ReadOnly(true)]
[Editable(true)]
public string LoginUser
{
get
{
return _loginUser;
}
set
{
_loginUser = value;
OnPropertyChanged("LoginUser");
}
}
[ReadOnly(true)]
[Editable(true)]
public string LoginUser
{
get
{
return _loginUser;
}
set
{
_loginUser = value;
OnPropertyChanged("LoginUser");
}
}
SIGN IN To post a reply.
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 16.2.0.50.
Regards,
Arun Siva R
Arun Siva R
CB
Christian Bender
March 5, 2019 02:14 PM UTC
Hello Arun,
thank you for your answer, it works as expected :-).
Regards
Christian
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.
Regards,
Subburaj Pandian V
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.
https://www.syncfusion.com/forums/143309/essential-studio-2019-volume-1-beta-release-v17-1-0-32-is-available-for-download
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.
Regards,
Deivaselvan
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.
https://www.syncfusion.com/forums/143309/essential-studio-2019-volume-1-beta-release-v17-1-0-32-is-available-for-download
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.
Regards,
Deivaselvan
SIGN IN To post a reply.
- 4 Replies
- 4 Participants
-
CB Christian Bender
- Mar 4, 2019 03:18 PM UTC
- Mar 15, 2019 12:01 PM UTC