0

I am using the Telerik radlistview o display some results, i perform some grouping in my query and return a sorted and ordered resultset and set it to the datasource. For some reason (which i have been battling with all morning) the ListView re-orders the results by the ID column.

<telerik:RadListView runat="server" ID="rlThumbnailView" OnNeedDataSource="rlThumbnailView_NeedDataSource"
                AllowPaging="true" PageSize="8" OnDataBound="rlThumbnailView_DataBound" OnItemDataBound="rlThumbnailView_ItemDataBound">
                <LayoutTemplate>
                    <span style="vertical-align: top; position: relative; top: 4px">Displaying page
                        <%#Container.CurrentPageIndex + 1 %>
                        of
                        <%#Container.PageCount %></span> </span>
                    <br />
                    <div id="list">
                        <asp:Panel runat="server" ID="Panel1" Style="float: left; margin-left: 160px" Visible="<%#Container.PageCount > 1 %>">
                            <asp:Button runat="server" ID="PrevButton" CommandName="Page" CommandArgument="Prev"
                                Text="Prev Page" Enabled="<%#Container.CurrentPageIndex > 0 %>" />
                            <asp:Button runat="server" ID="NextButton" CommandName="Page" CommandArgument="Next"
                                Text="Next Page" Enabled="<%#Container.CurrentPageIndex < Container.PageCount - 1 %>" />
                        </asp:Panel>
                        <div>
                            <telerik:RadSlider runat="server" ID="RadSlider1" MaximumValue="3" MinimumValue="1"
                                Value="2" LiveDrag="false" SmallChange="1" AutoPostBack="true" OnValueChanged="RadSlider1_ValueChanged"
                                Width="150px" CausesValidation="false" />
                        </div>
                        <div style="clear: both;">
                        </div>
                        <asp:Panel ID="itemPlaceholder" runat="server">
                        </asp:Panel>
                        <div style="clear: both;">
                        </div>
                    </div>
                </LayoutTemplate>
                <ItemTemplate>
                    <div id="wrapper" runat="server" style="float: left; margin-top: 2px; margin-bottom: 2px;">

                                <telerik:RadBinaryImage ID="ThumnailImage1" runat="server" />

                            UPC:
                            <asp:Label ID="lblUPC" runat="server"></asp:Label><br />
                            Description:
                            <asp:Label ID="lblDescription" runat="server"></asp:Label>
                            <br />
                            <div id="dvCountries" runat="server">
                                Languages:</div>
                            Changes:<asp:Label ID="lblChanges" runat="server"></asp:Label>
                            <br />
                            Pack Format:<asp:Label ID="lblPackType" runat="server"></asp:Label>
                            <br />
                            Date Completed:<asp:Label ID="lblDateCompleted" runat="server"></asp:Label>
                            <br />
                        </div>
                    </div>
                </ItemTemplate>
            </telerik:RadListView> 

I beleive this is based on the standard microsoft listview,

1
  • If i remove "AllowPaging="true" PageSize="8" the results dont get resorted
    – Ketchup
    Jun 27, 2012 at 10:10

1 Answer 1

1

For anybody who faces the same issue, the answer appears here:

http://www.telerik.com/community/forums/aspnet-ajax/listview/listview-paging-and-sortorder.aspx

seems to be a bug with Telerik

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.