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

ascending order CAML query

$
0
0
 var objQuery = new SPQuery
                    {
                        Query = "<OrderBy><FieldRef Name='" + internalName + "' Ascending='TRUE' /></OrderBy><RowLimit>1</RowLimit>",
                        Folder = list.RootFolder
                    };
                    SPListItemCollection colItems = list.GetItems(objQuery);

I am using the above query to get the list of items in ascending order but it is not giving the correct results.

Viewing all articles
Browse latest Browse all 11571

Trending Articles



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