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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

EditSetting:showAddNewRow=true does not show a row

Thread ID:

Created:

Updated:

Platform:

Replies:

124796 Jun 30,2016 11:36 AM UTC Jul 5,2016 12:06 PM UTC JavaScript 3
loading
Tags: ejGrid
duncan
Asked On June 30, 2016 11:36 AM UTC

EditSetting:showAddNewRow=true does not show a row however the SAVE button is enabled on the toolbar. If I hit the CANCEL button the new row shows up in edit mode.

What am I doing wrong?



Isuriya Rajan [Syncfusion]
Replied On July 1, 2016 05:48 AM UTC

Hi Duncan,   
  
Thanks for contacting Syncfusion support.   
  
We are unable to reproduce the mention issue “showAddNewRow=true does not show a row however the SAVE button is enabled on the toolbar”. So, please revert us by modifying the sample based on your application along with the replication procedure.   
 
Please share the following details to find the cause of the issue,     
     
1.           Please provide the grid rendering code example.    
2.           Please provide the issue reproduced screen shot.   
3.          Check whether any script error occurs at developer tools console?   
 
   
The “showAddNewRow” property of Grid indicates whether to display the added new form by default in grid.  The “cancel” button helps to cancel the entered value and it undo the grid state which is the default behavior. Please find the screen shot.   
   
The below screen shot indicates if new value is entered in to grid and if we click “cancel’ icon then edit state will be cancelled.   
   

 
And Grid maintain its original state when “showAddNewRow” property is enabled  
 

 
 
It will enable the new empty edited row at the time of cancel and save operations. 
Please find the below attached online documentation and sample link 
 
 
 
Regards, 
Isuriya R. 


duncan
Replied On July 4, 2016 08:19 AM UTC

hI Isuriya,

I can't give you the full example to be honest as my client is a little sensitive, however I think I know what is happening.

As soon as I set showAddNewRow=true I get the error 'CurrentViewData is null' which does not make a lot of sense as the grid binds correctly without this value.
I'm using JSRender templates for some of my columns and  I think that the templates are trying to work with NULL data provided from the Add Row.

Is there a one liner that I can usewithin my JSREnder templates to check for the presence of data. i.e in pseudo-code:

If(CurrenctViewData!=null){
// build the template control
}else{
// do nothing
}

Regards,

Duncan

Karthick Kuppusamy [Syncfusion]
Replied On July 5, 2016 12:06 PM UTC

Hi Duncan,   
  
We are unable to reproduce the reported issue at our end.   
  
Query:   
Is there a one liner that I can usewithin my JSREnder templates to check for the presence of data. i.e in pseudo-code?  
   
we suspect that you are using if and else conditional statement in JsRender template.   
Provided code:   
  
If(CurrenctViewData!=null){
// build the template control
}else{
// do nothing
}
   
   
  
   
   
Please use the below code example instead of your code (Js Render if and else).   
  
<script type="text/x-jsrender" id="columnTemplate">   
                    {{if EmployeeID == 4}}   
                    <div style="color:red">   
                        {{:EmployeeID}}   
                    </div>   
                    {{else}}   
                    <div style="color:green">   
                        {{:EmployeeID}}   
                    </div>   
                    {{/if}}   
                </script>   
  
   
  
Please find the js playground sample.   
  
If we have misunderstood your requirement, please share the following details to validate the issue.  
  
1.Could you please share the detail about essential studio version?   
2.In which scenario you are getting currentview data as null?   
  
Regards,   
K. Karthick  


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.

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

;