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

Clicking Add in 2nd detail view enables update button in 1st detail view ??

Thread ID:

Created:

Updated:

Platform:

Replies:

124416 Jun 8,2016 12:37 PM UTC Jun 16,2016 05:36 AM UTC JavaScript 3
loading
Tags: ejGrid
duncan
Asked On June 8, 2016 12:37 PM UTC

When I have two details views expanded and I click Add in the Second one, the Update button in the First one gets enabled. When I press it there is no result and no error!

Can anyone shed any light on how to get around this fundemental issue?

Prasanna Kumar Viswanathan [Syncfusion]
Replied On June 9, 2016 09:22 AM UTC

Hi Duncan, 

Thank you for contacting Syncfusion Support.   
  
The mentioned issue arises due to the same ID for the two detail views. So, we suggest that you mention unique Id for each detail view.   
  
Find the code example and sample:   


<script id="tabGridContents" type="text/x-jsrender"> 
             <div id="detailGrid{{:EmployeeID}}"> 
        </div> 
    </script> 
    <script type="text/javascript"> 
        $(function () { 
            $("#Grid").ejGrid({ 
                // the datasource "window.employeeView" is referred from jsondata.min.js 
                dataSource: ej.DataManager(window.employeeView).executeLocal(ej.Query().take(9)), 
                detailsTemplate: "#tabGridContents", 
                detailsDataBound: "detailGridData", 
                editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, 
                toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel] }, 
                columns: [ 
                         ------------------------------ 
               ] 
            }); 
        }); 
        function detailGridData(e) { 
            var filteredData = e.data["EmployeeID"]; 
            // the datasource "window.ordersView" is referred from jsondata.min.js 
            var data = ej.DataManager(window.ordersView).executeLocal(ej.Query().where("EmployeeID", "equal", parseInt(filteredData), true)); 
            e.detailsElement.find("#detailGrid" + filteredData).ejGrid({ 
                dataSource: data, 
                allowSelection: true, 
                allowPaging: true, 
                pageSettings : { pageSize : 2}, 
                editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true }, 
                toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel] }, 
                columns: [ 
                         -------------------------------- 
 
                ] 
            }); 
        } 
    </script> 


Regards, 
Prasanna Kumar N.S.V 
 


duncan
Replied On June 15, 2016 08:03 AM UTC

Thanks for the advice I'll bear it in mind for future usage. I found a solution by creating 2 different prototypes for my grids in the end instead of trying to do everything in 1 prototype.

Prasanna Kumar Viswanathan [Syncfusion]
Replied On June 16, 2016 05:36 AM UTC

Hi Duncan, 

We are happy to hear that your issue has been resolved. 

Please let us know if you need any further assistance. 

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.

Please sign in to access our forum

or the page will be automatically redirected to 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

;