Question

I have a subgrid on my contact entity.

This is image

I want that when the first record is selected in the subgrid above buttons enables and disables on uncheck.

I know how to enable diable button but i dont know where/how to call my function.

Was it helpful?

Solution

Try this code on the OnLoad Form event, to access the subgrid onClick Event.

function OnLoad() {
    var subGridId = gridId + "_d";

    var grid = document.getElementById(subGridId);

    if( grid != null){
        grid.onclick = ClickAction;
    }

}

function ClickAction() {
    //insert your Click action here.
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top