Core Docs

SearchEntryString

Giống SearchEntry nhưng bind giá trị **string code** thay vì id.

Source: Core/Components/SearchEntryString.cs ComponentType trong DB: DropdownString (alias chính). Cũng dùng được SearchEntryString qua reflection.

Cấu hình

ComType:           DropdownString          # alias chính cho SearchEntryString
FieldName:         CustomerCode      # string field
Reference:         Customer
RefName:           Customer
DataSourceFilter:  ?$filter=Active eq true

Field DB dùng

Giống SearchEntry, không có TopEmpty. Khác biệt chính: FieldName bind tới string code (vd "CustomerCode") thay vì FK int.

Events kích hoạt

Giống SearchEntry:

EventMethod signature
change(entity, matched, oldMatch, parent)
AfterCreated(entity)
AfterRender(entity)

Khi nào dùng

Khi entity cha mang mã string (vd CustomerCode = "ACME") thay vì foreign key (CustomerId = 7). Picker hiển thị danh sách Customer, user chọn → lưu Code vào field.

Tip

  • Validate uniqueness của Code trước khi save (ValidationExtensions.IsUnique).
  • Cấu hình tương tự SearchEntry, chỉ khác kiểu lưu.

Core Docs · Astro · Core.API/wwwRoot/docs