Update Cell with Child Grid

Hi Team,

I have a grid that has a child grid and I want to update a cell value by clicking a custom command button but what happens is that it updates the column before the column I want to update. The UpdateFreight worked well before I added the child grid.

 <script type="text/javascript">
        $(function () {
            $("#Grid").ejGrid({
                // the datasource "window.employeeData" is referred from templatelocaldata.js
                dataSource:window.gridData,
                allowPaging: true,
toolbarSettings:{showToolbar:true,toolbarItems:[ej.Grid.ToolBarItems.Add,ej.Grid.ToolBarItems.Cancel,ej.Grid.ToolBarItems.Delete,ej.Grid.ToolBarItems.Edit,ej.Grid.ToolBarItems.Update]},
                //editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },                
              editSettings:{allowEditing:true,allowAdding:true,editMode:"batch"},
                enableAutoSaveOnSelectionChange: false,
                pageSettings: { pageSize: 10 },
                enableRowHover: false,
                columns: [
                  
                
                               { field: "EmployeeID", headerText: "Employee ID", width: 150 },
                
                               { field: "Freight", headerText: "Freight", width: 100},
                               { 
                      headerText: "Update",
                      //headerTemplateID: "#employeetemplate",  
                      width: 60,
                      allowEditing: false,                     
                      commands: [
                          {
                              
                              type: "details",
                              buttonOptions: {
                                  text: "Update",
                                  width: "50",
                                  click: "UpdateFreight",
                              }
                          }
                      ],
                      isUnbound: true,
                      textAlign: ej.TextAlign.Center,
          },
 ], 
                  childGrid: {
            dataSource: [],
            queryString: "EmployeeID",   
            allowPaging: true,
            pageSettings: { pageSize: 5 },
            create: 'childCreate',
            columns: [
                { field: "ItemNo", headerText: "Item No.", width: 100 },
                { field: "OrigItemNo", headerText: "Orig. ItemNo", width: 120 },
                { field: "Description", headerText: "Description", width: 310 },
                { field: "ShipQty", headerText: "Ship Qty.", width: 100 },
            ],
        },
                
            });
        });                
function UpdateFreight(args) 
    {
                  
                  var grid = $("#Grid").ejGrid("instance")
       var index = this.element.closest("tr").index();
              
                        grid.setCellValue(index, "Freight", 0);
    }

3 Replies

SR Sellappandi Ramu Syncfusion Team October 12, 2015 04:28 AM UTC

Hi  Lory,

We considered the requirement “While using details grid, data is updated in previous column by using setCellValue() method” as a bug. We have logged a report on this and will fix the issue internally, also the fix will be included in Volume 3, 2015 Service Pack 1 ,which has been scheduled to be rolled out in the end of October, 2015.


We have also created an incident internally to have a follow up with this issue.


Regards,
Sellappandi R



LO Lory November 12, 2015 05:33 PM UTC

Hi Team,

I just found out that the Essential Studio 2015 Volume 3 Service Pack 1  was already released. Is the fix for this included in the pack?


Thanks.


SR Sellappandi Ramu Syncfusion Team November 13, 2015 07:08 AM UTC

Hi Lory,

Yes, we have included the “While using details grid, data is updated in previous column by using setCellValue() method” bug in  Essential Studio 2015 Volume 3 Service Pack 1 release and it can be downloaded from the following link:
                           
http://www.syncfusion.com/forums/121006/essential-studio-2015-volume-3-service-pack-1-release-v13-3-0-12-available-for-download

Regards,

Sellappandi R



Loader.
Up arrow icon