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.

JavaScript Grid - detailData function

Thread ID:

Created:

Updated:

Platform:

Replies:

112433 Sep 23,2013 07:44 AM Sep 25,2013 03:32 AM JavaScript 1
loading
Tags: ejGrid
Ladislav Lisy
Asked On September 23, 2013 07:44 AM

I am wondering how I could specify detailData callback function. There is "detailGridData" used in sample what equals to window.detailGridData. Is it possible to bind something like "objectWindow.detailGridData" for this property or something else to avoid global Windows function reference?


Maithiliy K [Syncfusion]
Replied On September 25, 2013 03:32 AM

Hi Ladislav,

 

Thanks for using Syncfusion Products.

 

Query : Is it possible to bind something like "objectWindow.detailGridData" for this property or something else to avoid global Windows function reference?

 

Yes we can bind like "objectWindow.detailGridData" to the "detailData" property. Get the functions as collection of JSON data, and need to attach an event handler function to window object then only we can access the functions within the JSON data. Please refer the below code snippet for more information

 

<script type="text/javascript">

 

   // JSON data

   var detailObject = {

      detailGridData: function (e) {

             . . . . . . .

      . . . . . . .

}

   }

  

  // attach an event handler function to window object

  window.objectWindow = detailObject;

 

  $(function () {

     $("#Grid").ejGrid({      

       . . . . . . .,

      . . . . . . .,        

        detailData: "objectWindow.detailGridData"

       . . . . . . .,             

     });

  });

 

</script>    

 

 

For your convenience we have prepared a simple sample and the same can be downloaded from the following location.

 

Sample link:  DetailTemplate.zip

 

Please try this and let us know if you would require any further assistance.

 

Regards,

Maithiliy 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.

;