locked
Objectlist Problems RRS feed

  • Question

  • User33524104 posted

    I am usin a objectlist. I hve given paginate as true for the form and i have some banners to be shown in the all the pages. But these controls are cming only in the first page. i have tried the example given in the below page. But it is not working.

    http://samples.gotdotnet.com/MobileQuickStart/(S(foj5csaanqyj0g55jsvgap45))/Default.aspx?url=doc/Pagination.aspx

    Pasting the code which i have used

    Code for sw:Accounts

    <mobile:ObjectList runat="server" ID="gv" EnableViewState="false" LabelField ="Name" ItemsPerPage="1"
        AutoGenerateFields="true" TableFields="Name;Site" OnItemSelect="Selected"
        Font-Size="small" >
                <Field Title="Name" DataField="Name" Visible="true" Name="Name" />
                <Field Title="Site" DataField="MS Location" Visible="True" Name="Site" />
                <Field Title="Id" DataField="Id" Visible="false" Name="Id"/>
        </mobile:ObjectList>

    Code in the main page

    <body>
        <mobile:Form id="MyAccount" runat="server" Paginate="true" PagerStyle-Font-Size="small" PagerStyle-NextPageText="To Page {0}"
        PagerStyle-PreviousPageText="To Page {0}" >
        <mobile:DeviceSpecific>
        <Choice>
        <HeaderTemplate>
            <sw:Masterbanner ID="Masterbanner" runat="server" />
            <br />
            <sw:MasterNavigation ID="MasterNavigation" runat="server" />
            <br />
            <sw:Search ID="Search" runat="server" />
            <br />
        </HeaderTemplate>
        </Choice>
        </mobile:DeviceSpecific>
            <sw:Accounts id="Accounts" runat="server" />
        </mobile:Form>
    </body>


    I have 2 more problems.

    1. In the first page, only the items in the Header is coming in some mobile devices
    2. In the list, only one column is shown in the objectlist. (column named 'Name') Beow is the code

    <mobile:ObjectList runat="server" ID="gv" EnableViewState="false" LabelField ="Name" ItemsPerPage="1"
        AutoGenerateFields="true" TableFields="Name;Site" OnItemSelect="Selected"
        Font-Size="small" >
                <Field Title="Name" DataField="Name" Visible="true" Name="Name" />
                <Field Title="Site" DataField="MS Location" Visible="True" Name="Site" />
                <Field Title="Id" DataField="Id" Visible="false" Name="Id"/>
        </mobile:ObjectList>


     

    Friday, December 29, 2006 3:07 PM

Answers

  • User33524104 posted

     

    For solving these problems

     1. Removed the itemsperlist as the items per list will be automatically assigned by the device according to its browser property

    2. added BrowserCaps configurations in my web.config with tables true

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 11, 2007 11:58 PM