I am using CAML to query a SharePoint list through the web service and outputting to a GridView in C#/ASP.Net. The problem I am having is that more columns are being shown than what I have specified in the 'ViewFields' part of the query (eg. shown below).
viewFields.InnerXml = "<ViewFields>" +
"<FieldRef Name="Col1" />" +
"<FieldRef Name="Col2" />" +
"<FieldRef Name="Col3" />" +
"<FieldRef Name="Col4" />" +
"</ViewFields>";
I have tried setting to false in the 'QueryOptions'.
Can anyone offer any solution to this problem, so that only the specified columns are returned?