.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Display single item from List using XSLT and show total count of all items in list

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#

I have a simple SharePoint 2010 list named "Tips". Each item consists of a Title and Description. I want to display a single item at a time in a sidebar on my site with arrows to advance to the next or previous item in the list. I've been able to accomplish this pretty easily using OOTB SharePoint XSLT list view web part settings and AJAX. However, when I tell the web part to only display 1 item at a time the pager always says it's showing item "1 of 1" or "2 of 2". It won't show the total number of items from the list. I'd like it to show something like item "1 of 25", etc. How do I get it to display the total count of items from the list?  I've looked at possibly using aggregation attributes on a FieldRef but I've not been able to get anything to work. I'm not even sure that's the right place to be looking. I'm needing to accomplish this without writing a custom web part. 


View Complete Post

More Related Resource Links

Get related item id in task list to display all task items related to this item

this is my scenario i have a document library with customized workflow in this workflow i have 6 collect data from user all of them have description feild i need when user display any item in library to view all of its description feilds related to this document as its meta data   sooo any idea

Show total items for GridView in List.aspx or GridViewPager

Hi, Is there a solution to show total items in Grid View in List.aspx or GridViewPager Eg. Record: 1 - 20 of 231 

Column to show count of attachments uploaded for each List item in MOSS 2007


We have two requirements:

First, we need a column which shows the count of attachments that are for uploaded each item, the list structure is like below:

No. Of Files Attached Title Category Description Owner

Display tooltip for Sharepoint list items


Hi All,

I am using MOSS 2007 and my requirement is to show tooltip when I hover the mouse over the title column for each item. I am planning on storing the tooltip string for each listitem in a seperate column. Is there a way to do it. I am sure there is. Any help is greatly appreciated.

Thanks in advance!




Choose Item from dropdown list and display in a separate URL ASP.NET

Hi, I've a dropdown list for departments (engineering, bio, chemistry,physics etc.) when somebody choose the departments from the dropdown list, it displays the opening closing time(hours) in a detailsview controls. I have separate homepage for these departments ( these are the static html pages and no way to send querystring value) and I want to link the hours for each department from the departmental homepage. When I choose the department from the DDL, everytime it's the same URL. How can I solve the problem  So that I can point the respective hours from the respective departments ?   Thanks in advance.    

Best way to display data of a single column from a Sharepoint Custom List

I'm trying to create pages that will automatically populate with data pulled from a sharepoint list (like title, department, contact info, etc.).   I'm using publishing pages. What would be the easiest way to do this, and how would I specify which data to pull from the list? For example, the page would be set up like this: [Title:biology] [Department:biology] [Contact Info:biology]   and when the page loads, it would look like this: Biology Lab Biology Department 123-456-7890   I want it to just pull the data -- I don't want a list view or anything like that.  I need this page to look pretty, and I need the each column's data to show up in a very specific place. How could I make pages that would do that?

Need to link multiple External Content List items to a single document metadata column

I have an external content list - for my purposes, the data isn't any fancier than a list of terms provided by a web service (read only - I don't need update/delete functionality). I want to be able to link any subset of those terms to a single document metadata column (in other words, I need it to work like a normal content list that is defined to allow multiple values in a column) but SharePoint doesn't let me do that on an ECL. I need the content list to be externally driven since more values are going to be added to an outside system over time, but I think it's possible that I may not need a full-fledged ECL list to make this work this way in SharePoint. Just to clarify: I don't need the metadata values in my documents to maintain a PERSISTENT link to the web service (if someone changes an underlying value in the web service DB, it doesn't need to be updated in the document table too). I just want SharePoint to offer up an updated set of source values from the web service if somebody goes in and edits the document metadata. Any ideas for how I can make this work?

how to display multiple calendar list data in single calendar view

Hi, Normally, we can used to extend the ListViewWebPart's ViewType property to display a particular calendar list items in Calendar View in our custom webpart. Is it any way to display multiple calendar list data in a single calendar view ?? or please provide some pointers related to this issue. Any help is much appreciated.    

how can I display radio button list item


I have a radio button list item on the page.

I want that on the  selection of  the second list item , it will call a javascript function and display another radio button listitem on that page.

Now i can call the javascript function but cant able to make hidden or display of the radio button list item.

I need it using javascript only. 

Show and hide items in the list as per permission (depend on the permission)


Dear all,

In sharepoint 2010

How I Show and hide items in the list as per permission.

i.e the user can fill the most fields in the list and we need to prevent him to see manager's fields in the same list.


List Properties Supporting Files Display item form won't stay set


In Sharepoint designer I am trying to set a custom display form for a list, following the instructions in the Sharepoint designer help.


I've got a functional display form, called DispForm3.aspx. I know it works since I tested it by replacing the form name in the normal URL where a display form is opened.


However I can not get the list to accept this new form as the display item form.


In Sharepoint Designer, in the List Properties Supporting Files tab I set the Display item form to be DispForm3.aspx and press OK. When I look again I see that the Display item for is DispForm.aspx.


This happens on any list that I try to customise the display form for, even new ones.


Sharepoint designer is allowing me to set the display item form to DispForm3.aspx but is not saving it, or is failing silently when it tries to save it.


Any assistance appreciated.


how to make webpart only show top list item?

Our office is new to SharePoint (including me!).  On our new SharePoint intranet I want to create a SharePoint Tips list.  I then want to put a WebPart on the home page that only shows the most recent tip added to the list.  I can't figure out anyway to configure that.  Thanks for suggestions.

List Item View Count - Blog Site



Is there any way we can find how many times the Article is viewed in a Blog Site.

In Blog Site there is a list called Posts and I have List Items like Article1,Article2, Article3........  Is there anyway i can display the Article View count on the Post.aspx page ? i want display on each article how many times the page is viewed.

Please let me know how to acheive this ..

Thanks in Advance


Custom List Form - Display Item - SPD



I have a Blog Template Site and i like to Customize the Display Item Form (Post.aspx) and i am trying to Insert the Custom List form from SPD and the Data Source only display Particular Columns.. Is there any way i can retrieve all the "Column Names" in the list??

It default retries only following Columns to customize (ID,Content Type,Title,Body,Last Modified,Category) is there any way i can retrieve all the columns in that list ???

Thanks in Advance


Adding windows forms controls to the display of list items



I'm new to Sharepoint development, and was wondering if I could get some brief pointers to get me going in the right direction.  I'm required to add a button to list items that on submit does some manipulation of the data in the fields inside the item and then sends that data off to an external webservice.  The complexity is sufficient to warrant managed code, i.e. C#.

What I'd like to know is how to approach integrating this code into Sharepoint.  I've read about web parts, but viewing list items doesn't involve web part pages on my installation so I can't include my own.  What other ways are there of doing this?

Cheers all

Display rating control in xslt list view webpart without table header



In the same code, pasted above if I want to display rating control using xslt list view webpart what I need to write.

I have created few xslt list view webparts for my site but I am not able to display rating control using xslt. I am writing something like this

<xsl:apply-templates select="$Fields[@Name='AverageRating']" mode="PrintField">
              <xsl:with-param name="thisNode" select="."/>
              <xsl:with-param name="Position" select="$Position"/>

But for this I think i need to include some parameter or any particular template. Using the above type of code in xslt this is not working. I do not want to display table header row. Please guide me on this.


View for a single list item?


I have a SharePoint 2010 list that manages work orders, but I can't find a way to create a view that shows only one record in a receipt-like format.  I have seen that there is the capability to use XSLT to create custom views, but I can't see where I would upload/edit this in SharePoint Designer (I have Visual Studio, but haven't started using it yet for SharePoint development)

Here is an example of what I want to do...

Fields in the List:

Date | Customer Name | Description | Quote

I'd like to print out a receipt that looks like this:

Date: 10/15/2010
Customer Name: Joe Smith
Description: Level 1 Tune-Up
Quote: $200

I'm assuming that a View (which can be printed) would be the easiest way to do this, and that a custom Web Part would be the best but also a lot more work.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend