How to use AgGrid Batch Edit in streamlit so that i can copy paste a row from excel and trigger single event only?

Hi,

While implementing Aggrid , i wanted to have a functionality where i can do copy paste a row from excel and then trigger 1 event instead of multiple events. I saw this functionality from Aggrid JavaScript Grid: Batch Editing | AG Grid but I am not sure how to implement it in my code. this could be really game changing for me. thanks. when i tried copying multiple cell it deleted the value of cell just below the starting cell.

P.S. kudos to Pablo Fonseca for implementing this component. it is amazing. can’t thank you enough.

You can try configuring AgGrid’s batch edit mode with Streamlit so that all changes are captured together. Essentially, enable batch editing, then listen for the cell value change event after the paste action, so a single event triggers for the entire row instead of individual cells.

HI,

The doc page of batch editing states that the enable is done through API rather than just a kwarg.

Enabling Batch EditingCopy Link

Batch Editing is enabled by calling the grid API method startBatchEdit().

const gridOptions = {
    onGridReady: (params) => {
        params.api.startBatchEdit();
    },

    // other grid options ...
}

Once enabled, api.commitBatchEdit() or api.cancelBatchEdit() can be called to complete the batch edit operation.

This part i am not sure how to handle