Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

How to make a sub grid fields editable and required

$
0
0

Hi,

On the invoice form, there is a invoicedetail subgrid and few fields are enabled and required like the quantity.

I have created a new column and added to the subgrid but it's only in display mode.

I would like to make it editable and required.

I was exploring the subgrid properites and I found nothing interesting.

Then I tried using javascript but it doesn't work

var invoiceSubGrid = formContext.getControl("invoicedetailsGrid").getGrid();
var gridRows = invoiceSubGrid.getRows();
gridRows.forEach(function (row, i)
{
    var gridColumns = row.getData().getEntity().attributes;
    gridColumns.forEach(function(column, j) {
        varatrName = column.getName();
        varatrValue = column.getValue();
        column.setDisabled(false);
        column.setRequiredLevel("required");
    });
});

Thanks in advance


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>