Hi,
I need sorting on records in editable grid on created on field so added created on field in view, but as client requirement is not to show that column in the grid.
I handled onload event of editable grid , But in that I don't get the controls for created on cell.
controls value is null.
Please suggest the solution to hide created on column in Editable grid.
I am trying below code on Grid Onload.
var scRows = Xrm.Page.getControl("grd_Test").getGrid().getRows();
if (scRows != null && scRows !== "undefined") {
scRows.forEach(
function (scRow, i) {
var scControls = scRow.getData().getEntity().attributes.getByName("createdon").controls;
if (scControls != null && scControls !== "undefined") {
scControls.forEach(
function (ctl, j) {
ctl.setVisible(false);
});
});
Thanks,