Petya

Could you provide more details on the result you are trying to achieve? When you say you need to lock the fields, do you mean you need them to be read-only or something else? I'm also not sure how exactly you use ExpandoObject.

Please get back to us with information on your setup and the desired behavior.

Regards,
Petya
Telerik

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Petya

I still don't understand what the end goal that you are trying to achieve is. The attached application demonstrates how you can dynamically create and assign to a document a specific data source.

The code you sent us seems to be creating Label and TextBox controls based on the merge fields in a document, but it is not clear to me what the reason for this logic is. Please elaborate on the desired result and on what you mean by "locking" a field.

Regards,
Petya
Telerik

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

burk

Sorry I could not tell. I have a Word Docx file and it has got some MergeFields. I read them and get in dynamic object, but i want to dont touch any user change Fields in document. I want to change merge fields to read only.

Petya

There are several ways to make a certain part of your document read-only. For example, you could insert a read-only range around each field in your document. This will prevent users from editing it, but will still allow them to edit other parts of the document.

Alternatively, you can use the Document Protection functionality of the control that allows to set a specific user or a group of users permissions about different regions in the document.

I hope this is helpful.

Regards,
Petya
Telerik

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.