I am using Inline Editing using the toolbar with 'Add' 'Edit' 'Delete' 'Update'. This datasource for the grid is a using a service that responds with a list of objects based on a model.
The grid view includes accountName, userName and userPassword. And I am using
When I 'add' a new item in the args response it does not return a new 'CredentialDto' itemfor the datasource but only returns only the items in the grid view. I thought args.data should be the items in the grid view but expected args.rowData should be a new instance of the 'CredentialDto' containing all the items from the model
I am new to using this component so I may misunderstand how this should work. The goal is to get a new grid item based onCredentialDto.
RSRajapandiyan Settu Syncfusion Team February 20, 2023 12:43 PM UTC
Thanks for contacting Syncfusion support.
In EJ2 Grid, while adding the data, the edit form is created only for predefined
columns in Grid. So, in the actionBegin event (requestType as add), the
args.data contains the value only for the predefined columns. This is the behavior
of Grid. If you want to get all the fields of CredentialDto in the actonBegin
event, you need to define all the columns in Grid settings.
By using the visible property of Grid column, you can show/ hide the particular column based
on your requirement. Please refer to the below code example for your reference.