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.

getCurrentViewData doesn't work in 14.1451.0.41 version

Thread ID:

Created:

Updated:

Platform:

Replies:

124249 May 26,2016 01:06 PM Jun 2,2016 12:49 AM ASP.NET Web Forms 8
loading
Tags: Grid
Manolo
Asked On May 26, 2016 01:06 PM

Hi,

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 08:36 AM

Hi Manolo, 

Thank you for contacting Syncfusion support. 

We have created a sample with 14.1.0.41 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.  
 

Regards, 

Jayaprakash K. 


Manolo
Replied On May 30, 2016 06:10 AM

Hi,

I attach an example

Manolo
Replied On May 30, 2016 06:11 AM

Sorry... the example _:)

Attachment: SyncfusionASPNETGrid_2ca06bb2.zip

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

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" 
            </ej:Grid> 

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


Regards, 

Jayaprakash K. 


Manolo
Replied On May 31, 2016 02:31 AM

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 09:35 AM

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. 


Regards, 

Jayaprakash K. 


Manolo
Replied On June 1, 2016 10:46 AM

Ok,!

Thanks a lot

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

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


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.

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.

;