MUI Data Grid Premium - Lack of Row-Level Data in onClipboardPasteStart/onClipboardPasteEnd Events

141 views Asked by At

I'm currently working with the MUI Data Grid Premium version and I'm using the clipboard functionality to copy multiple cells and paste them. While the onClipboardPasteStart and onClipboardPasteEnd events are available, I've run into an issue.

These events provide the cell values but don't seem to offer any information about which row or column the values came from. This makes it challenging for me to update the database correctly since I need to know the source row and column information.

Here's a simplified version of the code I'm working with:

<DataGrid
  rows={rows}
  columns={columns}
  onClipboardPasteStart={(values) => {
    // I receive an array of values, but I need to know the source row and column for each value.
    // How can I obtain this information?
  }}
  onClipboardPasteEnd={(values) => {
    // The same issue here, I don't have row and column information for each pasted value.
  }}
/>

Is there a way to obtain row-level data or at least the source column when using the onClipboardPasteStart or onClipboardPasteEnd events or apiRef event in the MUI Data Grid Premium version? I need this information to update the database correctly. Any guidance or suggestions would be greatly appreciated.

Thank you in advance!

0

There are 0 answers