Process api response body after creating new item in grid with DataManager and WebApiAdaptor

I have a bazor page to create new api-key-items for a service. The secret key of the api-key is generated on the server side and is only sent back once with the post response from the api controller. It is not stored in the database for security reasons and therefore not part of the get response after reading all api-key-items from the controller again. But the user needs to see and copy it directly after creating the new api-key-item.

I want to show the secret "key" as a grid column or better as a message after creating the new item like "Your Api-Key is ..." with an OK-Button or similiar.


How can I process the response from the server controller before the get-request is called?


1 Reply

PS Prathap Senthil Syncfusion Team August 6, 2024 01:38 PM UTC


Hi Robert Möllenhoff,


Based on your requirements, we suspect that you want to have auto generated column while inserting a record. If yes, we suggest enabling the IsIdentity property of the GridColumn for the primary key column. When IsIdentity is enabled, the column will be considered read-only during editing or adding a record Refer to the provided documentation for further details.

API Link: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridColumn.html#Syncfusion_Blazor_Grids_GridColumn_IsIdentity


Regards,
Prathap Senthil


Loader.
Up arrow icon