Proprietà Details

Restituisce il riquadro contenente la visualizzazione Dettagli specifica per il dispositivo. Per il dispositivo di destinazione è necessario scegliere e definire un modello di dettagli.

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

Osservazioni

La visualizzazione Dettagli include una tabella contenente i titoli e i valori di ogni campo. Inoltre elenca tutti i comandi associati a un elemento. La visualizzazione Dettagli contiene anche un collegamento che consente all'utente di passare alla visualizzazione elenco. Nel collegamento viene visualizzato automaticamente il testo Back.

Esempio

Nell'esempio che segue viene illustrato come utilizzare la proprietà Details per modificare l'etichetta del modello in "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>   

Vedere anche

Si applica a: classe ObjectList