Hide

YetaWF Documentation

Display
Print

YetaWF_Identity_UserId Component

YetaWF_Identity_UserId (Display)

Displays the model's user ID as a formatted user name. For authorized users, icons are rendered to login as the user shown and to display user information.

Model Type: int?

[Caption("User Id"), Description("The user's name or email address (if available)")]
[UIHint("YetaWF_Identity_UserId"), ReadOnly]
public int UserId { get; set; }

YetaWF_Identity_UserId (Edit)

Allows selection of a user name from a dropdown list or grid. The model represents the user ID.

Model Type: int

If a site has more than 50 users, a grid is used to show all users, otherwise a dropdown list is used for selection.

A sample page for this component is available at Tests > Components > UserId (standard YetaWF site).

AdditionalMetadata Attributes

NameTypeDefaultDescription
HeaderbooltrueDefines whether the grid header is shown.
ForcestringnullUsed to override the default grid or dropdownlist show. Specify "Grid" to force using a grid, or "DropDown" to force a dropdown list.
[Caption("User"), Description("Defines the user")]
 [UIHint("YetaWF_Identity_UserId"), AdditionalMetadata("Force", "Grid"), Trim]
 public int SelectedUser { get; set; }