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

getCurrentViewData doesn't work in 14.1451.0.41 version

Thread ID:





124249 May 26,2016 05:06 PM UTC Jun 2,2016 04:49 AM UTC ASP.NET Web Forms 8
Tags: Grid
Asked On May 26, 2016 05:06 PM UTC


I've this page:

And a javascript code in EditarButton for edit

var grid = $("#gridUsuarios").ejGrid("instance");
var index = this.element.closest("tr").index();           
var record = grid.getCurrentViewData()[index];
location.rel='nofollow' href = "AdministrarUsuario.aspx?ID=" + record.ID;

I've update syncfusion librario to 14.1451.0.41 version, and now the function getCurrentViewData doesn't work

Jayaprakash Kamaraj [Syncfusion]
Replied On May 27, 2016 12:36 PM UTC

Hi Manolo, 

Thank you for contacting Syncfusion support. 

We have created a sample with version. But we were unable to reproduce the issue at our end. 

Please share the following information to find the cause of the issue and provide a solution       
1.             Is there any script error or exception thrown in your project? If so, attach a screenshot of stack trace.   
2.             Issue replication procedure.   
3.             When you are facing the issue (while mouse click or touch the button)?  
4.             Check whether your grid id is correct or not.  
5.             Are you getting instance of grid?   
6.             Are you getting incorrect value in getCurrentViewData()?   
7.             Have you referred individual script file in your project?    
8.             An issue reproducing sample if possible or replicate the issue in the following sample.  


Jayaprakash K. 

Replied On May 30, 2016 10:10 AM UTC


I attach an example

Replied On May 30, 2016 10:11 AM UTC

Sorry... the example _:)

Attachment: SyncfusionASPNETGrid_2ca06bb2.zip

Jayaprakash Kamaraj [Syncfusion]
Replied On May 31, 2016 06:15 AM UTC

Hi Manolo, 

Since you have created grid instance with wrong grid id this issue has occurred. To overcome this problem, set ClientIDMode as Static in Grid or create instance using ClientID(var grid = $('#<%= Grid1.ClientID %>').data("ejGrid")). Please refer to the below code example and sample.   
<ej:Grid ID="Grid1" ClientIDMode="Static" AllowSorting="true" AllowPaging="True" 

        function onClick(args) { 
            var grid = $('#<%= Grid1.ClientID %>').data("ejGrid"); 
            var index = this.element.closest("tr").index(); 
            var record = grid.getCurrentViewData()[index]; 


Jayaprakash K. 

Replied On May 31, 2016 06:31 AM UTC

OK, setting clientIdMode it works

But two questions:

1) Why in version 13.XXX.XX.XX it works fine?
2) I don't understarnd the error... can you explain me?
3) What does the property "ClientIdMode?

Thanks a lot

Jayaprakash Kamaraj [Syncfusion]
Replied On June 1, 2016 01:35 PM UTC

Hi Manolo, 

Query1: Why in version 13.XXX.XX.XX it works fine? 
We are facing the same problem(without using ClientIDMode) older version also. 
Query 2 & 3:  I don't understand the error... can you explain me? What does the property "ClientIdMode? 

In ASP.NET , If you set ClientIDMode as static the grid id will be generated by given value(<ej:Grid ID="Grid1">) else Grid id will be generated  by concatenating given grid id and parent container id( eg: MainContent_Grid1). Because default value of ClientIDMode is AutoID. So, while creating grid instance with wrong id we will get the error in Grid. Please refer to the following screenshots. 

Before using ClientIDMode: 


After using ClientIDMode: 


 Please refer to the below link. 


Jayaprakash K. 

Replied On June 1, 2016 02:46 PM UTC


Thanks a lot

Jayaprakash Kamaraj [Syncfusion]
Replied On June 2, 2016 04:49 AM UTC

Hi Manolo,    
Thanks for the update. 
Get back to us if you need any further assistance. 
Jayaprakash K. 


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