How do I do it?
From your description, you are going to set the paging for list. Is that right?
If so, there will be no need for you to develop your own paging. Sharepoing has built-in support for the list paging. For example, in the "Shared
Documents" document library page, please select the "Modify settings and columns" link from the page left area. Then click "All Documents" of Views
section. In the "Edit View" page, please click "Item Limit" to extend it, then in the text box "Number of items to display:", input the number you
specify for one page. Ok to return. You will see the document library paging is displayed at the bottom right. However, this default paging with out
one previous for you. You have to use "back" button of IE to go back in the paging. For this issuce, you can open the page in Frontpage and then
convert the web part to XSLT, then save the page. The previous button will appear for you.
If my understanding doesn't locate your question, please feel free to let me know.
Best Regards,
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
This custom app piece will eventually be converted to a web part and
installed into the sharepoint site. Do I need to worry about retrieving only
a certain subset of page data so that it will work how I want, or since it
will be a web part, do I need to plan for that paging, or will sharepoint do
it automatically (I doubt).
If that wasn't clear, let me know
thanks
"Wei-Dong XU [MSFT]" <v-w...@online.microsoft.com> wrote in message
news:MdFSQ3uG...@cpmsftngxa06.phx.gbl...
From my view, you can convert your custom code, which retrieves the specified list items, into one web part directly. The retrieved list items are
controlled by your code. If you got any odd issue, please feel free to let me know.
thanks
"Wei-Dong XU [MSFT]" <v-w...@online.microsoft.com> wrote in message
news:wChp659G...@cpmsftngxa06.phx.gbl...
For retrieving the paging items, the recommended method is to us SPQuery Class. For example, for the document library, you can use the sample
code below to retrieve the paging.
//--------
SPWeb site = SPControl.GetContextWeb(Context);
SPList list = site.Lists["Announcements"];
SPQuery query = new SPQuery();
//define the
query.RowLimit = 10;
int i = 1;
do
{
Response.Write("<BR>Page: " + i + "<BR>");
SPListItemCollection listItems = list.GetItems(query);
foreach(SPListItem listItem in listItems)
{
Response.Write(SPEncode.HtmlEncode(listItem["Title"].ToString()) + "<BR>");
}
query.ListItemCollectionPosition = listItems.ListItemCollectionPosition;
i++;
} while (query.ListItemCollectionPosition != null);
//--------
You can find more information for this from the link:
SPListItemCollectionPosition Class
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/tscSPListItemCollectionPosition.asp
Based on my research, LIstItemCollectionPositionNext is the attribute of Paging element which is encapsulated in the query. Please use SPQuery to
perform the retrieving. In the article "GetListItems Method" of SPS sdk, it gives one description for this attribute for you, which is no need for us
to set this attribute directly with code.
Please feel free to let me know if you have any further questions.
"Wei-Dong XU [MSFT]" <v-w...@online.microsoft.com> wrote in message
news:oA3zGNIH...@cpmsftngxa06.phx.gbl...
I have been using a web service call where I would call GetListItems method
of my Lists class of my web reference to retrieve data into an xmlNode
object.
Using the sharepoint class to gain access to list data. Is this way a web
service call?
"Wei-Dong XU [MSFT]" <v-w...@online.microsoft.com> wrote in message
news:oA3zGNIH...@cpmsftngxa06.phx.gbl...
"Wei-Dong XU [MSFT]" <v-w...@online.microsoft.com> wrote in message
news:oA3zGNIH...@cpmsftngxa06.phx.gbl...
"Wei-Dong XU [MSFT]" <v-w...@online.microsoft.com> wrote in message
news:oA3zGNIH...@cpmsftngxa06.phx.gbl...
For the development of SPS, since SPS can only be supported in Windows 2003, you will need to perform the development in Windows 2003 as well.
"Can you explain the diff. between these 2 and why to use one versus the other"
This choice is up to you. If you scenario needs to consuming the SPS info from distributed location, Web service is one better choice. If you create
your web part and aspx page for running in the server-side, please use SPQuery Class which will provide better performance. My reply assumes you
are in the later scenario, for this is common. :-)
"How do I get the sharepoint assembly to import into code?"
My understanding to this question is: you want to know how to reference the sharepoint assembly. My answer: directly reference them in VS.net.
"If my custom app is not yet a web part, should I still use your recommendation?"
Of course.
thank you
"Wei-Dong XU [MSFT]" <v-w...@online.microsoft.com> wrote in message
news:jd7rzhYH...@cpmsftngxa06.phx.gbl...
As I know, the ListItemCollectionPositionNext has been encapsulated into
SOAP layer fo SPS. Since there is no any public documentation introducing
more info concerning this property, please use the SPQuery method from
Wei-Dong to retrieve the list items.
Kindly Regards,
Peter Huang
Microsoft Online Partner Support
""Peter Huang"" <v-ph...@online.microsoft.com> wrote in message
news:yKnJ3LTI...@cpmsftngxa10.phx.gbl...