Hide the 2 first columns from child table

Hello any help please ,

I want to hide the 2 first columns from child table row-index and row-check

Capture d’écran du 2023-08-02 09-38-16

I do this code but only the body hide and no the head of child table

    frm.fields_dict['historique'].grid.wrapper.find('.grid-row-check').hide();
    frm.fields_dict['historique'].grid.wrapper.find('.sortable-handle').hide();

Capture d’écran du 2023-08-02 09-37-16

1 Like

I resolve it by :

 setTimeout(function () {
    $('.grid-heading-row .sortable-handle, .grid-body .sortable-handle').hide();
 }, 500);

but now I want to hide the last column of settings
Capture d’écran du 2023-08-02 10-16-26

I do this code:

$('.grid-heading-row .d-flex, .grid-body .d-flex').hide();
//frm.fields_dict['historique'].grid.wrapper.find('div.d-flex').css({'visibility':'hidden'});
frm.fields_dict['historique'].grid.wrapper.find('.btn-open-row').hide();

but don’t hide column
Capture d’écran du 2023-08-02 10-13-25

Check it.

Thank You!

I do it but doesn’t work

I do

$('.grid-heading-row div.d-flex, .grid-body .grid-row div.d-flex').css('visibility', 'hidden');

it clear data and the column stay i want to remove column

Capture d’écran du 2023-08-02 10-36-06

Hi @Hela_Guesmi,

Please apply it.

        setTimeout(function () {
            $('div[class="col grid-static-col d-flex justify-content-center"]').remove();
            $('div[class="col"]').remove();
        }, 500);

Then reload and check it.

Thank You!

2 Likes

it 's work Thank you very much

Hi NCP, Is the child column visibility can be adjusted based on role? Also can the child table width can be set default without expecting the user to modify. Pls advise.