Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How do you use the Paging Control?How do you use the Paging Control?
Previous
 
Next
New Post
10/14/2007 10:44 PM
 

Hi.  I'm a DNN newbie and I need a bit of help.  I have products I want to present in a module for shopping which will need to have a Paging Control at the top and bottom of the display area.  I gather that DNN (and other 3rd parties) has a Paging Control.  However I cannot find any documentation on how to use this control.  Could someone enlighten me....

I would also like to know how the module passes the current page number, page size, etc to the Paging Control.  I have also read that the standard DNN Paging Control has a bug that won't allow you to place more than one one a page as they each respond to the events.  Anyone like to comment on that?

 
New Post
11/24/2009 4:52 PM
 

I have found some interesting information about the paging control, and while I'm still having trouble, this is what I have found...

In my ASP page I have this code at the top:

<%@ Register TagPrefix="dnn" Assembly="DotNetNuke" Namespace="DotNetNuke.UI.WebControls" %>

Then on the page, I refrence this code:

<dnn:pagingcontrol id="ctlPagingControlMyIdeas" runat="server" CssClass="Normal"
                    BackColor="Transparent"></dnn:pagingcontrol>

On the backend in VB:

  Private Overloads Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
            Try
                If Not (Request.QueryString(Utility.CurrentPage) Is Nothing) Then
                    CurrentPage = Int32.Parse(Request.QueryString(Utility.CurrentPage))
                    CurrentPageIndex = CurrentPage - 1
                End If
                'If Not Page.IsPostBack Then
                Dim oControler As New IdeaController
                Dim oIdeas As List(Of IdeaInfo) = oControler.GetApprovedIdeas(ModuleId)
                Dim oPageDataSource As New PagedDataSource          ' - This is where I call the pageDataSource
                oPageDataSource.DataSource = oIdeas                           '- I then set it to the Ideas list
                If Me.PageSize > 0 Then
                    oPageDataSource.PageSize = PageSize
                    oPageDataSource.CurrentPageIndex = _CurrentPage - 1
                    oPageDataSource.AllowPaging = True
                End If
                grdAllIdeas.DataSource = oPageDataSource                        ' I set the grids datasource
                grdAllIdeas.DataBind()                                                                 ' and bind it.

                If PageSize = 0 OrElse grdAllIdeas.Items.Count <= PageSize Then
                    ctlPagingControlSearch.Visible = False
                Else                                  ' from here I set it to be visible and set it's properties with a with statement
                    ctlPagingControlSearch.Visible = True
                    With ctlPagingControlSearch
                        .TotalRecords = oControler.Count
                        .PageSize = PageSize
                        .TabID = TabId
                    End With
                End If
               
            Catch ex As Exception
                'MsgBox("Failed and didn't return a value", MsgBoxStyle.Information)
            End Try

        End Sub

=========================================================

Now the problem I'm having is I'm using DevExpress and using a pageControl and tabpages. Now a few of these TabPages call the pagecontrol. However, when clicked it refreshes the page and then it defaults back to the first pagetab in the pagecontrol. When clicking on the tabpage where the pagecontroler was clicked I find that it worked, but I'm still trying to figure out how to not make it postback to the first page. :S

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...How do you use the Paging Control?How do you use the Paging Control?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out