Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

CAML query to retrieve listitems from a specific list view

$
0
0

Hi,

I am trying to retrieve some listitems from a specific view. But it always return all items from the view.
Passing the view parameter will overwrite the where clause in the query. How can I filter the results with a specific view?

Thanks.

SPQuery query = new SPQuery();
query.Query = "<Where><Eq><FieldRef Name='Company'><Value Type='Text'>ABC</Value></Eq></Where>";
SPListItemCollection res = list.GetItems(query, view);


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>