0
votes

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.

1
Are you building a custom ribbon?James Wood
No these are not ribbon buttons... these are javascript button in htmlDot_NET Pro
So you are building a custom ribbon then? Why not use the more straight forward method of a ribbon button?James Wood
As far as I know there is no supported way to add an onChange/OnFocus to a grid. Related info; woodsworkblog.wordpress.com/2014/01/27/…James Wood
Posted this awhile ago. It might be of helpful stackoverflow.com/questions/20656748/…Adi Katz

1 Answers

0
votes

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.
}