Home
PERENDERnew
Theme
Form
Basic components
PDF viewer
chartsnew
Installation
line
File browser
Rich text
Assign

1. Demo AstrolAssign

Note
The component can receive any type of object list in its UnAssignedList and AssignedList properties. For this, it is mandatory to represent one of the properties in the component using the PropertyShow parameter.
You can also specify, if desired, that your object has a unique property that is not displayed but is used for internal processing. For this purpose, the PropertyUnique parameter is used.
The PropertyUnique parameter is not required, but if not specified, it assumes that the PropertyShow parameter is unique.

Not assigned
20/20
Juan
María
Pedro
Ana
Luis
Laura
Carlos
Sofía
Miguel
Lucía
Andrés
Carolina
Javier
Valeria
Ricardo
Isabel
Roberto
Daniela
Gonzalo
Camila
Assigned
0/0
Not assigned: Juan, María, Pedro, Ana, Luis, Laura, Carlos, Sofía, Miguel, Lucía, Andrés, Carolina, Javier, Valeria, Ricardo, Isabel, Roberto, Daniela, Gonzalo, Camila
Assigned:
@using Astrol.Component.Basic.Assign
<AstrolAssign TItem="Person"
 Height="300px"
 UnAssignedList="unAssignedList"
 AssignedList="assignedList"
 PropertyShow="@nameof(Person.Name)"
 PropertyUnique="@nameof(Person.Id)"
 UnAssignedTitle="Not assigned"
 AssignedTitle="Assigned"
 PlaceholderInputSearch="Search..."
 OnChange="HandleMyEvent" />
@code {
 List<Person> assignedList = new List<Person>();
 List<Person> unAssignedList = new List<Person>()
 {
 new Person() { Id = 1, Name = "Juan", Age = 25, Sex = true },
 new Person() { Id = 2, Name = "María", Age = 30, Sex = false },
 new Person() { Id = 3, Name = "Pedro", Age = 40, Sex = true },
 new Person() { Id = 4, Name = "Ana", Age = 35, Sex = false },
 new Person() { Id = 5, Name = "Luis", Age = 28, Sex = true },
 };
 private void HandleMyEvent((List<Person>, List<Person>) items)
 {
 unAssignedList = items.Item1;
 assignedList = items.Item2;
 }
 public class Person
 {
 public int Id { get; set; }
 public string Name { get; set; }
 public int Age { get; set; }
 public bool Sex { get; set; }
 }
}

Supported parameters

  • UnAssignedTitle (string): Title of the first column of elements, default is (No asignado).
  • AssignedTitle (string): Title of the second column of elements, default is (Asignado).
  • PlaceholderInputSearch (string): Placeholder for the search input, default is (Buscar).
  • BorderRadius (string): Border radius for both columns (default is 5px).
  • Outline (bool): If set to true, it has no fill (default is false).
  • Height (string): Height of both columns (default is 300px).
  • PropertyShow (string): Property of the object list to be represented in both columns.
  • PropertyUnique (string): Unique property of the object list to be represented (used for internal processing), not required, and in case it does not exist, the component assumes that the PropertyShow parameter is unique.
  • TItem (generic type): Object, entity, or model to be used in the component.
  • UnAssignedList (List<TItem>?): List of unassigned TItem elements.
  • AssignedList (List<TItem>?): List of assigned TItem elements.
  • OnChange (EventCallback<(List<TItem>, List<TItem>)>): Event triggered when elements are assigned or unassigned between lists, allowing you to capture the changes.
© 2025 AstrolUI v8.0.4
Se ha producido un error no controlado. Recargar 🗙