Problem with paging in an SPGridView

  • Problem with paging in an SPGridView sbtahir

    We are using SPGridView and binding it to the database. Paging is also enabled.

    The grid is showing 10 records as the pagesize is 10, but when we click on the next page it says

    "There are no items to show in this view"

    The PageIndexChanging event code is:

    void Grid_PageIndexChanging(object sender, GridViewPageEventArgs e)
      Grid.PageIndex = e.NewPageIndex;

    The Second problem is that when I select a row in SPGrid the date columns are empty.

    Does anyone know how to do paging with SPGridView?

  • Powlo has posted a couple of great blog posts about using SPGridView including paging.

paging spgridview
Related questions and answers
  • I am trying to connect from BCS directly to Oracle, but there is an error: Keyword not supported: 'connect timeout'. I think that the connection string formed for Oracle is in an incorrect format for the method: protected virtual string CreateConnectionString(INamedPropertyDictionary lobSystemInstanceProperties){} Type: Microsoft.SharePoint.BusinessData.SystemSpecific.Db.DbConnectionManager Assembly: Microsoft.SharePoint, Version= Has anyone encountered a similar problem? Are there any solutions?

  • When using a Data View WebPart to retrieve items from a list, The WebPart shows the results as 1-10, then next page is 11-20 and so on. It does not show whether is it 1-10 of 10 or of 10000. Is there anyway that I can customize the Data View WebPart to show paging as 1-10 of X for example?

  • We are having usual behaviour with FullTextSqlQuery and wonder if anyone can help. The following should return 3 records which represent 3 pages on the site with titles "Sample (test1)", "Sample... this only yeilds 1 result, say "Sample (test3)". If we change this to use a query as follows, then this also returns a single result. However this time the result is a different record, say "Sample...(defaultproperties, '"sample"') ORDER BY "Rank" DESC Why are these queries not returning all 3 results? We have tried setting TrimDuplicates to false but it makes no difference.

  • returned or page through them. So I need the Search Paging and Search Statistics web parts. Now both of these require connecting to the Search Core Results web part (according to MS documentation), however when I try to add a web part connection in SharePoint designer I get an error dialog saying: The Search Paging Web Part does not support connections. So how can I connect these up? I cannot...This is my first time working with the search components of SharePoint in much detail so any advice would be helpful here. I have a custom search results page created to match our corporate intranet

  • We have an issue in accessing custom a DB from a SharePoint custom webpart. When we try to access the custom DB from SharePoint webpart we are getting the error "Login Failed for User NTAuthority...; The connection string we are using is "Data Source=xxxx; Initial catalog=yyy; Integrated security=true;" We have tried with a small change in conneciontion string as well "Data Source=xxxx; Initial catalog=yyy; Integrated security=SSPI;" It didn't work. It works in 3 scenarios, but these are not acceptable as per our client security rules, If we modify impersonation to use the domain user <identity

  • I can create a CQWP for the Announcement content type, but when I export the .webpart and add <property name="CommonViewFields" type="string">Expires,Date;Body,text</property> In my ItemStyles.xsl I have added this to show all the returned fields <xsl:template name="ShowXML" match="Row[@Style='ShowXML']" mode="itemstyle"> <xsl:for-each select="@*"> <br...; But Body always comes back blank. I have two site collections; one to test and one for production. The Test collection works and returns the body of the announcement, but the Production does

  • \xA0]+$)/g, ''); }; One would like to think that this page would always represent the currently logged in user, but sometimes it represents the prior user. Not good. UPDATE 3: I may have come up with a fix for this in my SPServices library, at least. It doesn't solve the larger problem that SharePoint seems to have, though. I added a unique Query String parameter (just the current time...In some instances of WSS or MOSS when you use the "Sign in as Different User" option, the new login doesn't "take". Is there any known issue here? Usually logging out and then logging back

  • . Note that this is just opening the Excel file without checking it out. Problem: Once in a while, and for no reason I can figure out, a user will click the button and the spreadsheet will be returned... is causing this behavior? I can change the code to avoid it if I can figure out why it is happening. Is there any way through the SharePoint UI or APIs to "release" the document so that the original...Scenario: We have an internal application that ties Excel spreadsheets stored in a SharePoint doc lib with specific Opportunities in CRM. The user clicks on a button in the Opportunity and a Web

  • We are trying to automate the solution deployment to a test environment. We are using vsewss 1.3. To do this we are trying to run the following command from the visual studio command prompt: devenv xxx.sln /deploy Release /package When we do this we get the following error: specified method is not supported And a message that the deployment has been skipped. Anyone have an idea what the problem could be, or how to fix it. EDIT I have tried a few things: Gave "Everyone" group modify access to the area where the solution files are Checked out solution and projects files so

Data information