Skip to content

Command

Command configuration:

.Columns(c =>
{
    c.Command(c => c.IconClass("bi bi-trash").OnClick("onDelete").BtnClass("btn btn-sm btn-danger"));
    c.Command(c => c.Text("Edit").OnClick("onDelete").BtnClass("btn btn-sm btn-success"));
})

Text

Set command text.

.Text("Delete")

OnClick

Set onClick function name.

.OnClick("onDelete")

IconClass

Set icon css class.

.IconClass("bi bi-trash")

BtnClass

Set button css class.

.BtnClass("btn btn-sm btn-danger")

Width

Set percentage of column where the command is.

.Width("1%")