We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Add record in edit mode in grid does not work

hi .In the example below, the TemperamentPropertyCategoryId field is defined as Identity in the database. When using edit mode in grid, in the Add field, the TemperamentPropertyCategoryId field is disabled and if this field is not filled, the Save button does not work and if we set this field An error occurs. If the 'isidentity' property is used, the save button still does not work. Please see screenshot attachments.


------------------------------------------
<EjsGrid ID="Grid1" @ref="@grid" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" })" AllowPaging="true">
    <GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" Mode="@EditMode.Dialog"></GridEditSettings>
    <EjsDataManager Url="/api/TemperamentPropertiesCategory1" Adaptor="Adaptors.WebApiAdaptor"></EjsDataManager>
    <GridColumns>
        <GridColumn Field="TemperamentPropertyCategoryId" IsIdentity="true" HeaderText="TemperamentPropertyCategory Id" IsPrimaryKey="true" TextAlign="@TextAlign.Right" Width="120"></GridColumn>
        <GridColumn Field="TemperamentPropertyCategoryName" HeaderText="TemperamentPropertyCategory Name" Width="150"></GridColumn>

    </GridColumns>
</EjsGrid>



Attachment: edit_6cbab872.rar

1 Reply

VN Vignesh Natarajan Syncfusion Team July 15, 2019 10:17 AM UTC

Hi Ebi Torabi,  

Thanks for contacting Syncfusion forums.  
 
Query: “ When using edit mode in grid, in the Add field, the TemperamentPropertyCategoryId field is disabled and if this field is not filled, the Save button does not work and if we set this field An error occurs. If the 'isidentity' property is used, the save button still does not work” 

From your query we understand that you are facing issue while adding a record with entity framework and IsIdentity. We have prepared a sample using EntityFramework and CRUD operation and we are able to add a record with PrimaryKey column as IsIdentity. Refer the below link for the sample.  


After referring the sample, if you are still facing the issue, Kindly get back to us with following details  

  1. Share the screenshot of script error in console window.
  2. If possible try to reproduce the reported issue in provided sample or share the issue reproducible sample.
  3. Share your Nuget version for Syncfusion.EJ2.Blazor component.

Requested details will be helpful for us to validate the reported issue at our end and provide the solution as soon as possible. 

Regards, 
Vignesh Natarajan. 
 


Loader.
Live Chat Icon For mobile
Up arrow icon