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

EditTemplate doesn't work

Thread ID:

Created:

Updated:

Platform:

Replies:

150241 Dec 27,2019 04:00 PM UTC Jan 7,2020 03:03 PM UTC Blazor 5
loading
Tags: Grid
Pierpaolo
Asked On December 27, 2019 04:00 PM UTC

We're currently working with Grid component in 17.4.0.40 and try to customize the in-line edit, our current GridColumn is this

<GridColumn Field=@nameof(ProductGridRow.ShortDescription) HeaderText="Description" Width="300" AllowSorting="false" Type="ColumnType.String" EditType="EditType.DefaultEdit">
    <EditTemplate>
        <EjsTextBox Value="@((context as ProductGridRow).ShortDescription)">

        </EjsTextBox>
    </EditTemplate>
</GridColumn>

but, every time we try to enter in edit mode, we get this error



We've tried also with a completely new grid but still the same error. How can we achieve that?

Vignesh Natarajan [Syncfusion]
Replied On December 30, 2019 01:24 PM UTC

Hi Pierpaolo,  

Greetings from Syncfusion support.  

Query: “but, every time we try to enter in edit mode, we get this error 
 
The reported issue occur in older version of Syncfusion Nuget package when ModelType property of EjsGrid is not defined. But from our 2019 Volume 4 release we have deprecated this (ModelType) property. Hence we are not able to reproduce the reported issue in our latest version 17.4.0.40.  
 
For your convenience we have prepared a sample which can be downloaded from below  
 
 
Kindly ensure that you have referred the latest version Nuget and script file properly. After ensuring, if you are still facing the issue, kindly get back to us with following details. 
 
  1. Share your Syncfusion Nuget package version along with script files version.
  2. Share your full Grid rendering code example.
  3. Are you facing this issue only while editing a record or while inserting a record also.   
  4. Share your model class.
  5. If possible try to reproduce the reported issue in provided sample or share the issue reproducible sample.

Regards, 
Vignesh Natarajan. 
  
  


Pierpaolo
Replied On December 30, 2019 04:05 PM UTC

We found the problem, it's related to "complex types" and nullables.

Our DTOs has some non-nullable enums that, with EditTemplate, breaks everything. 

In fact, using the same example that you give us and modifying the class into this (notice the Test property)



raise the bug. If you put nullable with "?" notation everything works. 

The annoying thing is that if you leave it non-nullable and remove the EditTemplate the cell itself goes to edit mode and saves everything without any problem! 

Maybe it will be better to improve serialization data for grid.

Pierpaolo
Replied On December 30, 2019 04:08 PM UTC

Please notice that this bug can be raised even if your DTOs has properties like this



Vignesh Natarajan [Syncfusion]
Replied On December 31, 2019 12:23 PM UTC

Hi Pierpaolo,  

We have prepared a sample as your suggestion and we are able to reproduce the reported issue at our end while editing a record.  Currently we are validating your query, we will update you  the further details by 2nd January 2020.  

Till then we appreciate your patience.  

Regards, 
Vignesh Natarajan. 


Vignesh Natarajan [Syncfusion]
Replied On January 2, 2020 01:00 PM UTC

Hi Pierpaolo,  

Thanks for the patience.  

We have validated the reported issue and we are able to reproduce the reported issue at our end while preparing a sample using your code example. We have confirmed it is issue and logged the defect report for the same Null reference error is thrown while using Editing template in Grid”. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming patch release which is expected to be rolled out on or before 14th  January 2020.  
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this feedback. 
 
   
Till then we appreciate your patience. 

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