The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Hot answers tagged

8

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


4

Are you just doing this on a field by field basis? If so then you can override the rendering template for a particular field using fldtypes.xsl files. Drop these into templates/layouts/xsl and they magically work. So if you had a custom field called MyBigField, you can define an XSL just for displaying that field value in a list. More info here:- http://...


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

You should treat Discussions as Folders and Threads as plain items. Basically the content types are Discussion (which inherits from Folder) and Message. Afterwards the best is to use SPQuery to retrieve the Items or simple GetItemById on the list to retrieve your item. The Message has a field as follows <Field ID="{7662cd2c-f069-4dba-9e35-082cf976e170}" ...


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 ...


1

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 ...


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