Details Property

Returns the panel that contains a device-specific details view. A details template must be defined and chosen for the target device.

public System.Web.UI.MobileControls.Panel Details {
   get
}

Remarks

The details view has a table that lists each field title and value. In addition, it lists all the commands associated with an item. This view also contains a link that returns the user to the list view. The link automatically displays the text Back.

Example

The following example demonstrates how to use the Details property to change the label in the template to "Personal Tasks".

Sub OnCmdClick(sender As Object, e As ObjectListCommandEventArgs)

   ObjectList1.EnsureTemplatedUI()
   ObjectList1.ViewMode = ObjectListViewMode.Details
   CType(ObjectList1.Details.FindControl("Label1"), System.Web.UI.MobileControls.Label).Text = "Personal Tasks"

End Sub

<mobile:Form runat="server" id="WelcomeForm" >
<mobile:objectList id= "ObjectList1" runat="server">
 <DeviceSpecific>
  <Choice>
    <ItemDetailsTemplate>
      <mobile:label runat="server" Text="Task List" 
         id="Label1" Font-Bold="true" />
         <mobile:Command id="Command1" runat="server"  
                  OnClick="OnCmdClick">Command</mobile:Command>
    </ItemDetailsTemplate>
  </Choice>
 </DeviceSpecific>
</mobile:objectlist> 
</mobile:Form>

[C#]
void OnCmdClick(object sender, ObjectListCommandEventArgs e)
{
      ObjectList1.EnsureTemplatedUI();
      ((Label)ObjectList1.Details.FindControl("Label1")).Text = 
          "Personal Tasks";
}
<mobile:Form runat="server" id="WelcomeForm" >
<mobile:objectList id= "ObjectList1" runat="server" OnItemCommand="OnCmdClick" >
 <DeviceSpecific>
  <Choice>
    <ItemDetailsTemplate>
      <mobile:label runat="server" Text="Task List" 
         id="Label1" Font-Bold="true" />
         <mobile:Command id="Command1" runat="server"  
                  OnClick="OnCmdClick">Command</mobile:Command>
    </ItemDetailsTemplate>
  </Choice>
 </DeviceSpecific>
</mobile:objectlist> 
</mobile:Form>   

See Also

Applies to: ObjectList Class