This question is locked. New answers and comments are not allowed.
Hello,
I have defined following easy DataTemplate, where ID is defined as ReadOnly, because value of this field is server-generated (identity field).
This DataTemplate is defined for all Templates: ReadOnlyTemplate, EditTemplate and NewItemTemplate.
When Edit button is pressed, ID is editable. This is probably bug.
Workaround exists, using TextBlock in explicit Content:
But this workaround has problem with other bug, where Id is not displayed:
http://www.telerik.com/community/forums/silverlight/data-form/data-template.aspx
Leos
I have defined following easy DataTemplate, where ID is defined as ReadOnly, because value of this field is server-generated (identity field).
<telerik:DataFormDataField Label="Id:" DataMemberBinding="{Binding Id,Mode=TwoWay}" IsReadOnly="True"/>This DataTemplate is defined for all Templates: ReadOnlyTemplate, EditTemplate and NewItemTemplate.
When Edit button is pressed, ID is editable. This is probably bug.
Workaround exists, using TextBlock in explicit Content:
<telerik:DataFormDataField Label="Id:" DataMemberBinding="{Binding Id,Mode=TwoWay}" IsReadOnly="True"> <telerik:DataFormDataField.Content> <TextBlock Text="{Binding Id, Mode=TwoWay}"/> </telerik:DataFormDataField.Content></telerik:DataFormDataField>But this workaround has problem with other bug, where Id is not displayed:
http://www.telerik.com/community/forums/silverlight/data-form/data-template.aspx
Leos