BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<EjsGrid DataSource="@Employees" Height="315">
<GridEvents OnActionBegin="OnBegin" TValue="Person"></GridEvents>
.. . . .. . . . . . .
<Template>
@{
var item = (context as Person);
. . .. . . . . .
}
@output
}
}
</Template>
<EditTemplate>
@{
var item = (context as Person);
string output = "";
if (item.Roles != null)
{
for (int i = 0; i < item.Roles.Count; i++)
{
if (item.Roles[i].Childrens != null)
{
output += item.Roles[i].Childrens.Child;
if (i < item.Roles.Count - 1) output += ", ";
}
}
}
<EjsMultiSelect @ref="MultiSelect" TValue="string[]" Value="@output.Split(",")" Placeholder="Roles" DataSource="@RoleList">
<MultiSelectFieldSettings Text="Child" Value="Child"></MultiSelectFieldSettings>
</EjsMultiSelect>
}
</EditTemplate>
. . . . . . . . .. . . ..
</EjsGrid>
@code{
public List<Person> Employees { get; set; }
EjsMultiSelect<string[]> MultiSelect { get; set; }
public List<EmployeeName> Emp { get; set; }
public List<Name> RoleList { get; set; }
public void OnBegin(ActionEventArgs<Person> Args)
{
if(Args.RequestType == Syncfusion.EJ2.Blazor.Grids.Action.Save)
{
Update the values in datasource
Args.Data.Roles[0].Childrens.Child = String.Join(",",MultiSelect.Value);
}
} |