RadListView & RadDataPager

2 posts, 0 answers
  1. Jean-Yves
    Jean-Yves avatar
    69 posts
    Member since:
    Feb 2009

    Posted 13 Mar 2010 Link to this post

    Hello,

    I have a really strange problem.

    I'm working with the Q1 2010.

    I want to use the RadListView as a list of news. With a pagesize of 1 and the newest post first. So i put in my asp:EntityDataSource :OrderBy="it.Date DESC"

    <telerik:RadListView ID="RadListView1" runat="server" DataKeyNames="IdPost"  
            DataSourceID="EntityDataSourceNews" AllowPaging="True" ItemPlaceholderID="itemPlaceholder"  InsertItemPosition="None" 
            OnItemCommand="RadListView1_ItemCommand" PageSize="1"
            <LayoutTemplate> 
                 
                <asp:PlaceHolder ID="itemPlaceholder" runat="server" /> 
                 
                <br /> 
     
                <telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="1"
                    <Fields> 
                        <telerik:RadDataPagerSliderField /> 
                    </Fields> 
                </telerik:RadDataPager> 
     
                <br /> 
     
                <asp:Button ID="btnInitInsert" runat="server" Text="Ajouter une news" onclick="btnInitInsert_Click" /> 
     
            </LayoutTemplate> 
    <ItemTemplate> 
                <div id="Historique" class="ui-widget-content ui-corner-all">  
                    <h2 class="ui-widget-header ui-corner-all"
                        <div style="float:right; font-size:10px"
                            <img src="/Images/famfamfam/date.png" /><em><%# Eval("Date") %></em
                        </div> 
                        <%# Eval("Titre") %> 
                    </h2>  
                    <class="borbot"
                        <%# Eval("PostContent") %> 
                    </p> 
                     
                    <div style="float:right; margin-right:5px"
                        <asp:ImageButton ID="DeleteButton" runat="server" CommandName="Delete"  
                            CssClass="rlvBDel" Text="Supprimer" ImageUrl="~/Images/famfamfam/Delete.gif" /> 
                    </div> 
                    <asp:ImageButton ID="EditButton" runat="server" CommandName="Edit"  
                        CssClass="rlvBEdit" Text="Editer" ImageUrl="~/Images/famfamfam/Edit.gif" /> 
                    <br /> 
                </div> 
            </ItemTemplate> 
    </telerik:RadListView> 
     
    <asp:EntityDataSource ID="EntityDataSourceNews" runat="server"  
            ConnectionString="name=PortailEntrepriseEntities"  
            DefaultContainerName="PortailEntrepriseEntities" EnableDelete="True"  
            EnableFlattening="False" EnableInsert="True" EnableUpdate="True"  
            EntitySetName="Posts" OnInserting="EntityDataSourceNews_Inserting" 
            OrderBy="it.Date DESC"
        </asp:EntityDataSource> 
     


    The thing is that the first item which appear, is the oldest one ! (So it's not working)
    But, if i go to the page 2, then come back to the page 1 it's the newest one !

    I mist something ? 

    Thank you
  2. Jean-Yves
    Jean-Yves avatar
    69 posts
    Member since:
    Feb 2009

    Posted 13 Mar 2010 Link to this post

    Ok, I don't understand anything... After trying eveything... In everyorder.... it didn't work, that's why I posed this message...

    And after rebooting my computer : It's working ! :o
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top