Hi Martin,
Greetings from Syncfusion support.
We suggest you to use the Column Template feature to achieve this requirement. You can render a SfChip inside column based on the PrimaryContactValues list populated inside ContextMenuItemClicked event handler.
References :
Please refer and use the codes below,
|
<GridEvents ContextMenuItemClicked="ContextMenuItemClickedHandler" TValue="Order"></GridEvents>
<Template>
@{
var employee = (context as Order);
<div class="template_checkbox">
@if (PrimaryContactValues.Contains(employee.OrderID.ToString()))
{
<div>
<SfChip>
<ChipItems>
<ChipItem Text="Primary Contact"></ChipItem>
</ChipItems>
</SfChip>
@employee.OrderID
</div>
}
else
{
@employee.OrderID;
}
</div>
}
</Template>
</GridColumn>
public List<string> PrimaryContactValues = new List<string>();public void ContextMenuItemClickedHandler(ContextMenuClickEventArgs<Order> args){ if(args.Item.Text == "Primary Contact") { PrimaryContactValues.Add(args.RowInfo.RowData.OrderID.ToString()); }}
|
Please get back to us if you need further assistance.
Regards,
Renjith R