Reputation: 1151
I am trying out Blazorise datagrid
to display rows and add new rows. I would like to customize the Salary field such that there is a + button on the new row form. This + button will retrieve the Salary based on certain criteria using AJAX call. Is it possible to do?
I took the screenshot from https://blazorise.com/docs/extensions/datagrid/templates
Upvotes: 0
Views: 1029
Reputation: 1194
You can do this by adding an EditTemplate
and defining the Select and Button components manually.
A quick example that will give you an idea:
<DataGridColumn Field="Salary">
<EditTemplate>
<Select TValue="decimal" SelectedValue="@((decimal)context.CellValue)" SelectedValueChanged="@(v=>context.CellValue = v)"
...
</Select>
<Button Color="Color.Primary>Add</Button>
</EditTemplate>
</DataGridColumn>
Upvotes: 1