I have a few read-only columns in the grid. When I do copy & paste to a new row, there is a pop-up saying these columns are read-only.
(1) How do I disregard these popups, or not display them at all when I paste to these read-only fields?
(2) How do I auto-populate the read-only fields when I paste, for example, some IDs should be auto-generated incrementally and filled into these columns.
Hello InfraNewbie,
I have modified the sample I sent you before, so now the Value Field is read-only, but you are able to edit it in the add new record. Basically I added a Style for the Field's Editor and added a Trigger to change the IsReadOnly Property when you are in the add new record. As for the first question, I am not sure that I fully understand your requirement. Could you please give us more details of the result you want to achieve?
Looking forward for your reply.
That's not exactly what I wanted. The auto Id field should be read-only, and when I copy & paste, it should be auto-populated.
One step further, I want to make one read-only field editable in the new row. How do I do that?
Thank you for your post. I have been looking into your questions and I create a sample project for you where the IDs are read-only and auto incremented. Basically I added a private static variable which is incremented in the constructor of the data object and assigned to the read only value. Please let me know if this helps you or you have further questions on this matter.
For (1), It can be resolved by setting DisallowModificationViaClipboard="True"