locked
I have problem in paginate RRS feed

  • Question

  • User-1936486868 posted

    Hi,

    In my mobile form i put one textbox, command button, object list.
    Suppose i give form1 pagination = true. page per item = 10,
    The item are displayed 10 per page. But the controls textbox,
    command button are not visible when i click next button.
    I dont know why the controls textbox and command button are not visible when click next.
    Is anybody faced this problem? plz ans. thnx...

    with regards ganesh[8-)]

    Thursday, August 28, 2008 7:09 AM

Answers

  • User-1113931457 posted

    it's because your next command inside objectlist control suppose to paginate the objectlist contains only not the forms properties(here, textbox and command). but if you want to paginate those with your objectlist control pagination then you have to include them inside objectlist container and use custom ojectlist data binding. here is an example

     

    1    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
    2    <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
    3    
    4    <html xmlns="http://www.w3.org/1999/xhtml" >
    5    <body>
    6        <mobile:Form id="Form1" runat="server" Paginate="true">
    7            <mobile:ObjectList ID="ObjectList1" Runat="server" CommandStyle-StyleReference="subcommand"
    8                LabelStyle-StyleReference="title" ItemsPerPage="10">
    9                <DeviceSpecific Runat="server">
    10               <Choice>
    11               <HeaderTemplate>
    12                   <mobile:TextBox ID="TextBox1" runat="server"></mobile:TextBox>
    13                   <mobile:Command ID="Command1" runat="server">Command</mobile:Command>
    14               </HeaderTemplate>
    15               <ItemTemplate><%# Eval("FirstName") %> <%# Eval("LastName") %></ItemTemplate>
    16               </Choice>                
    17               </DeviceSpecific>
    18           </mobile:ObjectList>
    19       </mobile:Form>
    20   </body>
    21   </html>
    22   
    

      

    but remember you have to handle the text box and command control according to the objectlist container's property. :)

    hope that helps

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 1, 2008 7:25 AM