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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add record in edit mode in grid does not work

Thread ID:

Created:

Updated:

Platform:

Replies:

145919 Jul 13,2019 10:57 AM UTC Jul 15,2019 10:17 AM UTC Blazor 1
loading
Tags: Grid
ebi torabi
Asked On July 13, 2019 10:57 AM UTC

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

Vignesh Natarajan [Syncfusion]
Replied On 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. 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon