Sharepoint Designer Code Help


I have the following code in sharepoint designed and am try to make some columns/fields read only? I understand I can put ReadOnly="True" in front of Fieldref and it would work, however, this is not working. What am I doing wrong?

<ListViewXml xmlns="">&lt;View Name=&quot;{E25EC1FD-7688-4154-9FF5-9F40ECA0BC14}&quot; DefaultView=&quot;TRUE&quot; Type=&quot;GRID&quot; DisplayName=&quot;datasheet_view&quot; Url=&quot;/sites/xxxx/Lists334/datasheet_view.aspx&quot; Level=&quot;1&quot; BaseViewID=&quot;1&quot; ContentTypeID=&quot;0x&quot; ImageUrl=&quot;/_layouts/images/generic.png&quot;&gt;&lt;ViewFields&gt;&amp;lt; READONLY=&quot;True&quot; FieldRef Name=&quot;PO_x0020_Number&quot; /&amp;gt;&lt;/FieldRef Name=&quot;ID&quot; /&gt;&lt;FieldRef Name=&quot;Date&quot; /&gt;&lt;FieldRef Name=&quot;Category&quot; /&gt;&lt;FieldRef Name=&quot;Sub_x002d_Category&quot; /&gt;&lt;FieldRef Name=&quot;Vendor&quot; /&gt;&lt;FieldRef Name=&quot;Currency&quot; /&gt;&lt;FieldRef Name=&quot;Net_x0020_Value_x0020__x0028_fro&quot; /&

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rainer JeschorCommented:
not sure but the above string looks strange as there seems to be two double encoded ampersands.

Could you please try and adjust the above (partial) string and replace

Open in new window


Open in new window

as well as repositioning the FieldRef value?

So the relevant part should be this:
&lt;FieldRef Name=&quot;PO_x0020_Number&quot; READONLY=&quot;True&quot; /&gt;

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.