Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > MessageBoard QueryRepeater ajax postback View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
adam - 2/16/2012 11:57:00 AM
   
MessageBoard QueryRepeater ajax postback
Hi

i'm trying to get the postback for the pager on the messageboard to use ajax.
i've followed this guide http://devnet.kentico.com/Knowledge-Base/Web-parts---Controls/Ajax-functionality-for-UniPager-connected-with-Rep.aspx

but it does not work for the queryrepeater. is this cause it does not have the property DelayedLoading?

how do i fix this?

User avatar
Member
Member
kentico_michal - 2/17/2012 6:29:20 AM
   
RE:MessageBoard QueryRepeater ajax postback
Hello,

Could you please specify what web part are you using? Are you using the Query Repeater web part or Message board web part?

Could you please make sure that the Paging mode property is set to the postback. Otherwise, the redirection is performed when the user changes the current paging page and because the ajax does not work when redirection takes place, it simply does not work as expected.

Best regards,
Michal Legen

User avatar
Certified Developer v7
Certified  Developer v7
adam - 2/17/2012 6:44:46 AM
   
RE:MessageBoard QueryRepeater ajax postback
I'm using /CMSModules/MessageBoards/Controls/MessageBoard.ascx.

here is a sampel of the code on that page

 <asp:Label ID="lblNoMessages" runat="server" Visible="false" EnableViewState="false" />
<cms:QueryRepeater ID="rptBoardMessages" StopProcessing="false" runat="server"/>
<cms:UniPager ID="UniPager" PageControl="rptBoardMessages" runat="server" PageSize="5" PagerMode="PostBack" GroupSize="1" DisplayPreviousNextAutomatically="false" DisplayFirstLastAutomatically="false" HidePagerForSinglePage="true">
<NextPageTemplate>
<li><a href="<%# Eval("NextURL") %>" class="btn">Next</a></li>
</NextPageTemplate>
<DirectPageTemplate>
Page
<asp:Literal ID="CurrentPage" runat="server" Text="<%#UniPager.CurrentPage.ToString() %>"></asp:Literal>
of
<%# Eval("Pages") %>
<asp:Label ID="TotalReviews" runat="server" Text='<%#string.Format("( {0} Reviews )", UniPager.DataSourceItemsCount.ToString()) %>'></asp:Label>
</DirectPageTemplate>
<PreviousPageTemplate>
<li><a href="<%# Eval("PreviousURL") %>" class="btn">Prev</a></li>
</PreviousPageTemplate>
<LayoutTemplate>
<div class="clear"></div>
<ul class="pager">
<asp:PlaceHolder runat="server" ID="plcPreviousPage"></asp:PlaceHolder>
<li><asp:PlaceHolder runat="server" ID="plcDirectPage"></asp:PlaceHolder></li>
<asp:PlaceHolder runat="server" ID="plcNextPage"></asp:PlaceHolder>
</ul>
</LayoutTemplate>
</cms:UniPager>


its working on postback but not when i try to ajax it.

User avatar
Member
Member
kentico_michal - 2/17/2012 8:32:10 AM
   
RE:MessageBoard QueryRepeater ajax postback
Hello,

Could you please post here the export of the Message board web part properties?

Which version of Kentico CMS are you using? Could you please confirm that you have applied the latest hotfix?

Best regards,
Michal Legen

User avatar
Certified Developer v7
Certified  Developer v7
adam - 2/17/2012 10:50:15 AM
   
RE:MessageBoard QueryRepeater ajax postback
kentico version v5.5.3999

settings are


Webpart properties (Message board)

Alias path: /Products/Cameras/test/test-V2
Zone ID: zoneMain


Default


Web part control ID: ProductComments

Web part title:

Disable view state: False

Disable macros: False


Visibility


Visible: True

Hide on subpages: False

Show for document types: CMSProduct.Product

Display to roles:


Display


Message transformation: SMS.Transformations.MessageBoard

Enable edit: False

Enable delete: False

Enable approve: False

Enable reject: False

No messages text: This product currently doesn't have any reviews


New board settings


Display name:

Message board owner: document

Access: 1

Authorized roles:

Moderators: SMS.Syndicut

Moderated: True

Require e-mail addresses: True

Use security code: False

Open: True

Open from:

Open to:

Enable subscriptions: False

Unsubscription URL:

Board base URL:


Content rating


Enable content rating: False

Rating type: DropDown

Max rating value: 5


Security


Check permissions: False

Enable anonymous read: True


HTML Envelope


Web part container:

Web part container title:

Content before: <div class="product-left">

Content after: </div>


AJAX


Use update panel: False


Time zones


Time zone: inherit

Custom time zone:


Partial caching


Partial cache minutes:

Partial cache dependencies: ##DEFAULT##


User avatar
Member
Member
kentico_michal - 2/21/2012 5:46:27 AM
   
RE:MessageBoard QueryRepeater ajax postback
Hello,

Could you please try to change the QueryRepeater definition in the ~/CMSModules/MessageBoards/Controls/MessageBoard.ascx file as demonstrated here:

<cms:QueryRepeater ID="rptBoardMessages" runat="server" EnablePaging="true" PageSize="1" PagerControl-PagingMode="PostBack" />

Then, it is necessary to enable the Use update panel property directly on the Message board web part.

Best regards,
Michal Legen

User avatar
Certified Developer v7
Certified  Developer v7
adam - 2/21/2012 11:14:53 AM
   
RE:MessageBoard QueryRepeater ajax postback
That doesn't work.

User avatar
Member
Member
kentico_michal - 3/5/2012 2:35:28 AM
   
RE:MessageBoard QueryRepeater ajax postback
Hello,

Could you please be more specific? What exactly does not work? Did you follow instructions from the previous posts?


Best regards,
Michal Legen

User avatar
Certified Developer v7
Certified  Developer v7
adam - 3/9/2012 6:56:37 AM
   
RE:MessageBoard QueryRepeater ajax postback
i followed your instuctions and the navigation buttons dont postback

User avatar
Certified Developer v7
Certified  Developer v7
adam - 3/9/2012 7:02:37 AM
   
RE:MessageBoard QueryRepeater ajax postback
its appears that the pagingmode postback does not work on query repeater.

there is a fix for vers 6 http://devnet.kentico.com/Blogs/Lukas-Martinak/January-2012/New-Hotfix-6-0-15-%28build-no-4409%29-Released.aspx

is there one for 5.5?

User avatar
Member
Member
kentico_michal - 3/12/2012 4:13:58 AM
   
RE:MessageBoard QueryRepeater ajax postback
Hello,

Regrettably, bugs are always fixed only in the current version, so, you will need to upgrade to Kentico CMS 6.0 and apply the latest hotfix.

Best regards,
Michal Legen

User avatar
Certified Developer v7
Certified  Developer v7
adam - 3/12/2012 4:16:38 AM
   
RE:MessageBoard QueryRepeater ajax postback
We can't upgrade to version 6 is there any code changes i can make to the webparts to enable this to work?

User avatar
Member
Member
kentico_michal - 3/12/2012 4:57:35 AM
   
RE:MessageBoard QueryRepeater ajax postback
Hello,

Regrettably, you would need to have the full source code of Kentico CMS to fix this issue. So, please consider to upgrade to Kentico CMS 6.0.

Best regards,
Michal Legen