Hot answers tagged

9

myQuery.RowLimit = 0 I think if I'm correct: 0 = unlimited Hope this helps. :)


4

How about creating the SPQuery object using the constructor where you can pass the appropriate SPView. http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.spquery.aspx You could then add a query to include the appropriate items, something like:- var query = new SPQuery(spView); query.Query = String.Format("<Where><Eq><...


2

This really intrigued me so I invested an hour into analysis of the problem. First of all, I was able to show the view using unchanged OP's declarative description of the view: Unfortunately, to achieve this I had to change internal state of variables inside Microsoft.Sharepoint.dll. Conclusion, you can't do this without recompiling SharePoint or injecting ...


2

The aggregation is not something that is calculated and stored but just defined type of aggregation required or to be done. You need to calculate it your own. SharePoint displays the aggregated data by using XSLT.


1

You can use SPQuery in Powershell if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } $web = Get-SPWeb http://myweb/ $list = $web.Lists["MyList"] $spQuery = New-Object Microsoft.SharePoint.SPQuery $spQuery.Query = $list.Views["ViewName"].Query $items = $list....


1

I was looking for an answer to this today. It appears to work if the type is in capitals. So use: <Aggregations Value="On"> <FieldRef Name="LinkFilename" Type="COUNT" /> </Aggregations> instead of: <Aggregations Value="On"> <FieldRef Name="LinkFilename" Type="Count" /> </Aggregations>


1

Try to use one of the tokens ~site ~sitecollection ~layouts ~siteLayouts ~siteCollectionLayouts I faced with problem that JSLink does not work without them. Edited In some cases you should encode "~" symbol.


1

I had similar case and I wasn't find solution for getting grouped result from list view. I write custom code on c# and LINQ with all aggregation and render data on third-party grid component.


1

When you add a new field i.e. Field2 it will automatically get added at the last of the view field collection. In order to place it at a proper place you will first need to create collection of fields based on their order, then clear all the fields in the view collection and finally adding the fields from your ordered collection to the view. This may be ...


Only top voted, non community-wiki answers of a minimum length are eligible