Attributes
KBlazor attributes decorate model properties to control how they appear in FlexTable and BasicEdit.
Marks a property editable directly within the FlexTable row. Use with the InlineEditor parameter.
[Display(Name = "Urgent")]
[AllowInlineEdit]
public bool IsUrgent { get; set; }
Applied to an entity class. When FlexTable or BasicEdit build a lookup list for that entity, the named navigation property is eager-loaded via IEntityLookupProvider.GetEntitiesWithInclude.
[AlsoInclude(Name = "Lines")]
public class Order : IKBusinessEntity
{
public virtual ICollection<OrderLine> Lines { get; set; }
}
On an entity-typed navigation property: BasicEdit renders a searchable MudAutocomplete instead of a dropdown, and the FlexTable column filter becomes an autocomplete with chips. No effect on scalar (Guid?) foreign keys.
[Display(Name = "Customer")]
[AutoComplete]
public virtual Customer? Customer { get; set; }
Declared only — intended for a dependent dropdown filtered by another property's value. Not consumed by any component yet.
[Display(Name = "Sub-Category")]
[CasscadeLookup(AdditionalProperties = "CategoryId")]
public Guid? SubCategoryId { get; set; }
Declared only — FlexTable cells already render nowrap with ellipsis, and the attribute is not read.
[Display(Name = "Amount")]
[DisplayNoWrap]
public decimal Amount { get; set; }
Declared only — BasicEdit reads it, but the date picker currently stays date-only.
[Display(Name = "Order Date")]
[EnableTime]
public DateTime OrderDate { get; set; }
Declared only — FlexTable reads it, but the value is still rendered as plain text.
[Display(Name = "Reference")]
[LinkOnField]
public string Reference { get; set; }
Renders the field in BasicEdit as an Edit button that opens a dialog with a multiline textarea.
[Display(Name = "Notes")]
[MemoDisplay]
public string Notes { get; set; }
Makes the field read-only when editing an existing entity (IsNew == false).
[Display(Name = "Order #")]
[ReadOnlyOnEdit]
public string Name { get; set; }
Gives SortAndFilterEngine dot-paths for an entity column: FilterPath (the FK id) makes it filterable via the name-search checkbox filter, SortPath makes it sortable by a scalar. Requires routing SortFilter through ApplyFilter/ApplySort. The legacy Member property is ignored.
[Display(Name = "Customer")]
[SortAndFilterOn(FilterPath = "CustomerId", SortPath = "Customer.Name")]
public virtual Customer? Customer { get; set; }
Declared only — intended to show a tooltip sourced from another property. Not consumed by any component yet.
[Display(Name = "Name")]
[ToolTipOnField(PropertyName = "Description")]
public string Name { get; set; }