How I can add a new row at the end of the table

I am currently working with Vue Syncfusion's Grid component where I'm working with tons of data populating the grids and I want to add new rows. The issue here is how to add in the bottom of my table


1 Reply 1 reply marked as answer

TS Thiyagu Subramani Syncfusion Team June 23, 2021 12:42 AM UTC

Hi alami, 
  
Thanks for contacting Syncfusion support. 
  
Query: How I can add a new row at the end of the table. 
  
Based on your query you want to add the newly added record to bottom of the Grid. By default, in EJ2 Grid’s inline editing the newRowPosition as bottom property value is used to display the Grid’s add form at the bottom position of Grid. So, it only displays the add form of Grid at bottom position as like the below screenshot, when the Add toolbar button is clicked and it do not affect the added record’s index in Grid. 
  
 
  
  
If you want the added records at the bottom index position then we suggest you to set the corresponding index values in the args.Index of actionBegin event. The record will be added in the grid based on the Index value you have specified. Please refer the below code snippet and the sample for your reference. 
  
actionBegin(args: any): void { 
        let gridInstance: any = (<any>document.getElementById('Normalgrid')).ej2_instances[0]; 
        if (args.requestType === 'save') { 
            args.index = (gridInstance.pageSettings.currentPage * gridInstance.pageSettings.pageSize) - 1; 
        } 
    } 
  
This requirement already explained in below online sample. Please refer it for more reference. 
  
  
Batch Editing Sample: https://ej2.syncfusion.com/vue/demos/#/material/grid/batch-editing.html - By default in Batch editing, row will be added to the end of table. 
  
Please get back to us, if you need any further assistance. 
  
If still facing the issue, please share the below details then only we can provide the appropriate solution as soon as possible. 
  
1. Which type of editing mode are you using in your application? 
  
2. If possible, share issue reproducing sample. 
  
3. Syncfusion package version. 
  
4. Video demonstration of your requirement. 
  
Regards, 
Thiyagu S. 


Marked as answer
Loader.
Up arrow icon