Partager via


QueryResultBase.GenerateMenuButtonHtmlForItem, méthode (Microsoft.SharePoint.Portal.WebControls)

The GenerateMenuButtonHtmlForItem method of the QueryResultBase class generates HTML for the menu button.

Espace de noms : Microsoft.SharePoint.Portal.WebControls
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)

Syntaxe

'Déclaration
Protected Overridable Function GenerateMenuButtonHtmlForItem ( _
    objectDataRow As DataRow, _
    iRow As Integer, _
    strHtmlInECB As String _
) As String
'Utilisation
Dim objectDataRow As DataRow
Dim iRow As Integer
Dim strHtmlInECB As String
Dim returnValue As String

returnValue = Me.GenerateMenuButtonHtmlForItem(objectDataRow, iRow, strHtmlInECB)
protected virtual string GenerateMenuButtonHtmlForItem (
    DataRow objectDataRow,
    int iRow,
    string strHtmlInECB
)

Paramètres

  • objectDataRow
    DataRow that represents the current item.
  • iRow
    Index of the DataRow in the DataSet.
  • strHtmlInECB
    HTML to be displayed in the menu button. This HTML is displayed for the menu button regardless of whether the mouse is hovered over the button.

Valeur de retour

String that contains the HTML string to display.

Remarques

The GenerateMenuButtonHtmlForItem method returns a menu button definition. Use HtmlMenuButton to generate the HTML.

Exemple

The following example shows how to use this method to generate a menu button definition.

[C#]

HtmlMenuButton btn = new HtmlMenuButton();
btn.MenuID = UniqueID;
btn.ID = "MY_ECB" + iRow.ToString();
btn.DisplayHtml = strHtmlInECB;
btn.Parameters.Add("parameter1", "value1");
return btn.RenderAsHtml();

Voir aussi

Référence

QueryResultBase, classe
Membres QueryResultBase
Microsoft.SharePoint.Portal.WebControls, espace de noms