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.

Childgrid and WebApi Odata v4

Thread ID:

Created:

Updated:

Platform:

Replies:

125052 Jul 18,2016 03:17 AM Jul 20,2016 12:58 PM JavaScript 3
loading
Tags: ejGrid
Andrea Perazzolo
Asked On July 18, 2016 03:17 AM

Dear,
In the master I want to have the list of groups, and in details all users in that particulary Group, I attached my source.I'm having troubles using childgrid and odata v4 webapi both to retrieve master & childs data.
In the master I want to have the list of groups, and in details all users in that particulary Group, I attached my source.

Attachment: ex2_be6f2882.zip

Prasanna Kumar Viswanathan [Syncfusion]
Replied On July 19, 2016 08:35 AM

Hi Andrea, 

Thanks for contacting Syncfusion support.   
  
We created a sample in Hierarchy Grid with odataV4adapter and we did not face any issues while using childgrid.   
  
Please find the code example and sample:   


var dm = ej.DataManager({ url: "/odata/Employee", adaptor: new ej.ODataV4Adaptor() }); 
 
    var dataManager = ej.DataManager({ 
        url: "/odata/Order", 
        adaptor: new ej.ODataV4Adaptor() 
    }); 
 
    $(function () { 
        $("#FlatGrid").ejGrid({ 
            dataSource: dm, 
            ------------------------------ 
           columns: [ 
                   ------------------------------- 
           ], 
            childGrid: { 
                dataSource: dataManager, 
                queryString: "EmployeeID", 
                allowPaging : true, 
                columns: [ 
                  ----------------------------------- 
               ], 
            }, 
 
        }); 
    }); 
</script> 


Try the above sample and if you still face any trouble, please provide the following details.   

1. If you face any exception or console error, Share the stackrace of the exception  

2. In the code example, you are using custom adapter. But, we did not found the extension of custom adapter. So, please confirm the type of adapter used in your sample  

3. Code example of a controller.  

4. Essential Studio Version details. 

Regards, 
Prasanna Kumar N.S.V 
 


Andrea Perazzolo
Replied On July 19, 2016 10:01 AM

Dear,
please note that I want to navigate from Group to Users with a Many-To-Many relation.
The customAdapter is the one that you give me for updating entries with PATCH instead of PUT (you can find it in the Scripts folder), I attached my full code.
With you childgrid mechanism I cannot navigate for example the odata url "/odata/Groups(3)/Users" that lists all users in group with ID = 3.

Thanks in advance.
Kind regards,
Andrea.

Attachment: THEasy_3a9103bf.zip

Prasanna Kumar Viswanathan [Syncfusion]
Replied On July 20, 2016 12:58 PM

Hi Andrea, 

Before proceed with your requirement confirm the below details, 

1. Provide the JSON structure of datasource used for the child grid. In this update the url for the child grid we found that you have passed with ID values. So, please confirm with below JSON structure that you are used for the child grid. 


"[{"Name":"Jim","Skills":["C++","Java","Painting"]},{"Name":"Joe","Skills":["INT","",""]}]" 
  

Regards, 
Prasanna Kumar N.S.V 


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.

;