locked
ObjectList and Command controls rendering differently RRS feed

  • Question

  • User-597672045 posted

    I have a Palm Treo 750 unit which I think has Win Mobile 6.0.  When I use IE to see this page, the picture below represents what I expect to see.

    I see exactly what you see above on another Palm Treo unit (600 series I believe), but with mine, I see

    *  A regular button, not a link button above the ObjectList control
    * Only one column.  I only see Col1, but not the other two.

    This is driving me out of my mind.  I understand that the page layout should be linear, but disallowing more than one column even though the control (ObjectList) itself allows it?  And what is the deal with the button format? 

    There is nothing special about my code, but here it is.

     

    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">
    7 <mobile:Command ID="cmdTest" Format="Link" Runat="server">Button</mobile:Command>
    8 <mobile:ObjectList ID="ObjectList1" Runat="server" CommandStyle-StyleReference="subcommand" 9 AutoGenerateFields="True">
    10
    11 </mobile:ObjectList>
    12 </mobile:Form>
    13 </body>
    14 </html>
    15

    Code beside

     

    1    public partial class _Default : System.Web.UI.MobileControls.MobilePage
    2 {
    3 protected void Page_Load(object sender, EventArgs e)
    4 {
    5 if (!IsPostBack)
    6 {
    7 DataTable table = new DataTable();
    8 table.Columns.Add("Col1");
    9 table.Columns.Add("Col2");
    10 table.Columns.Add("Col3");
    11 12 for (int i = 0; i < 10; i++)
    13 {
    14 Random r = new Random(i);
    15 DataRow row = table.NewRow();
    16 row["Col1"] = r.Next();
    17 row["Col2"] = r.Next();
    18 row["Col3"] = r.Next();
    19 table.Rows.Add(row);
    20 }
    21 ObjectList1.TableFields = "Col1;Col2;Col3";
    22 ObjectList1.DataSource = table;
    23 ObjectList1.DataBind();
    24 }
    25 }
    26 }
     
     

     

    Tuesday, February 26, 2008 5:03 PM

All replies

  • User-2141108582 posted

     


    Hi ...

       very Nice Work Its helps me lot .. thanks
     

    Thursday, June 5, 2008 3:11 AM
  • User-69253881 posted

    hmmm... don't hurry- it will not work with all models smartphone- test by Sony Ericsson K750 (most popular in Europe) and you will find all by one column - user will very disappointed after it (one column gives him sequenced an logical for reading text - but two column transformed into one - not always good for reading and understanding).

    Have a niceday,

    Sincerely, LukCAD & HR
     

    Friday, June 6, 2008 6:43 AM