Compartir a través de


: QueryResultBase.GenerateMenuButtonHtmlForItem (Método) (Microsoft.SharePoint.Portal.WebControls)

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

Espacio de nombres:
Ensamblado: Microsoft.SharePoint.Portal (in microsoft.sharepoint.portal.dll)

Sintaxis

'Declaración
Protected Overridable Function GenerateMenuButtonHtmlForItem ( _
    objectDataRow As DataRow, _
    iRow As Integer, _
    strHtmlInECB As String _
) As String
'Uso
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
)

Parámetros

  • 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.

Valor devuelto

String that contains the HTML string to display.

Comentarios

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

Ejemplo

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();

Vea también

Referencia

QueryResultBase (Clase)
QueryResultBase (Miembros)
Microsoft.SharePoint.Portal.WebControls (Espacio de nombres)