Hi Tim,
This is not supported out of the box with Datagrid.
You can try workarounds with Javascript.
Regards,
Sharad R K
I've used this piece of Javascript to solve it. Add this as a Javascript action in the flow that opens your page.
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import "mx-global";
import { Big } from "big.js";
// BEGIN EXTRA CODE
// END EXTRA CODE
/**
* @param {string} classname - Classname of the div(s) containing the inputfields to be trimmed on paste
* @returns {Promise.<void>}
*/
export async function JavaScript_TrimInputOnPaste(classname) {
// BEGIN USER CODE
let fields = document.getElementsByClassName(classname);
let trimField = function(e) {
e.preventDefault();
let pastedText = '';
if (e.clipboardData && e.clipboardData.getData) {
pastedText = e.clipboardData.getData('text/plain').trim();
e.clipboardData.setData('text/plain', pastedText);
} else if (window.clipboardData && window.clipboardData.getData) { // IE
pastedText = window.clipboardData.getData('Text').trim();
}
this.value = pastedText;
};
for (let i = 0; i<fields.length; i++) {
let div = fields[i];
let childs = div.children;
for (let j = 0; j<childs.length; j++) {
let child = childs[j];
if (child.nodeName == 'INPUT'){
child.onpaste = trimField;
}
}
}
// END USER CODE
}