Hi Brian,
Thanks for contacting Syncfusion Support.
Query#:- When an
ej:Button on the dialog is pressed, the new value should be applied to the
associated column for all selected records. Because we're in Batch edit mode, this
should result in each cell that was changed displaying the dirty indicator in
the upper left corner.
We have checked your query and while using BatchEditMode, when
we edit cell by cell the edited cell values has been denoted with red indicator
with left corner which is the default behavior. Do you want to save the cell
immediately without displaying red indicator means you can follow the below KB
link.
Also We need some more additional details to achieve your requirement.
Please share us the following details.
The provided information will be helpful to provide you
response as early as possible.
Regards,
Farveen sulthana T
Here's a more recent blog post around this that is a bit more dynamic:
https://www.syncfusion.com/blogs/post/bulk-edit-columns-in-javascript-datagrid.aspx
// Grid Rendering
var grid = new ej.grids.Grid({
dataSource: window.orderData,
. . .
});
grid.appendTo('#Grid');
// Dialog Rendering
editDialogInstance = new ej.popups.Dialog({
target: document.getElementById('BulkEdit-dialog-container'),
width: '350px',
content:
'<input id="inVal" class="e-input" type="text" placeholder="Enter the value here!"/>',
showCloseIcon: true,
position: { X: 'center', Y: 'center' },
visible: false,
buttons: [
{
click: onClickSaveBtn,
buttonModel: {
isPrimary: true,
content: 'Save',
},
},
{
click: onClickCancelBtn,
buttonModel: {
content: 'Cancel',
},
},
],
});
editDialogInstance.appendTo('#dialogBulkEdit');
document.getElementById('change').addEventListener('click', (e) => {
editDialogInstance.show();
});
var currentEditColumn = 'CustomerID';
/**
* Called when click 'Save' button in Dialog
*/
function onClickSaveBtn() {
var editableRows = grid.getSelectedRecords();
var changes = { changedRecords: [], addedRecords: [], deletedRecords: [] };
var inputEditor = document.getElementById('inVal');
for (var k = 0; k < editableRows.length; k++) {
var updateObj = {};
var newValue = '';
newValue = inputEditor.value;
updateObj = editableRows[k];
updateObj[currentEditColumn] = newValue;
changes.changedRecords.push(updateObj);
}
// Save changes
grid.getDataModule().saveChanges(changes, grid.getPrimaryKeyFieldNames()[0]);
grid.refreshColumns();
// Previous changes are removed and dialog is hidden
changes = { changedRecords: [], addedRecords: [], deletedRecords: [] };
editDialogInstance.hide();
}
/**
* Called when click 'Cancel' button in edit modal
*/
function onClickCancelBtn() {
editDialogInstance.hide();
}
|
Hi all
Please help me.
How to work it with Blazor (Apply changes to multiple rows while in Batch mode)?
It's like images by Brian Cernoch
Thank you
Hi,
Blazor query has been created as a new forum ticket. Please follow the below ticket for further updates.
Custom Requirement in Grid ~ Branched from F169891 | Syncfusion Forum Assist
Regards,
Suganya Gopinath.