How To Make CRUD opertaion in Pivot Table?

Hi,

How To Make CRUD Operation in Pivot Table using URL Adapter to add, edit or delete from Controller?

I Tried to edit but I failed

In Controller

Action Edit in Controller

In View

Code of Pivot Table View

Thanks


1 Reply

MM Manikandan Murugesan Syncfusion Team November 18, 2021 04:00 PM UTC

Hi Ahmed, 
  
Kindly use the “editCompleted” event to update edited data in controller. Please refer to the following code example. 
  
Code Example: 
<ejs-pivotview id="PivotView" height="300" showFieldList="true" editCompleted="editCompleted"> 
    <e-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Normal"></e-editSettings> 
</ejs-pivotview> 
<script> 
    function editCompleted(args) { 
        $.ajax({ 
            url: "/Home/BatchUpdate", 
            type: "POST", 
            data: JSON.stringify({ 'added': addItems, 'deletedIndex': gridIndex, 'changed': prevItems, 'modifiedIndex': indexObject }), 
            dataType: 'json', 
            contentType: 'application/json; charset=UTF-8', 
            success: function (response) { 
                console.log("Edit Completed"); 
            } 
        }); 
    } 
</script> 
  
Meanwhile, we have prepared a sample for your reference. 
  
Also please refer to the following document to know more details about the “editCompleted” event. 
  
  
Please let us know if you have any concerns. 
  
Regards, 
Manikandan 


Loader.
Up arrow icon