cancel
Showing results for 
Search instead for 
Did you mean: 

Resize Sub-Form / XRef Grid Columns

RusFM
Contributor III

Archer Community-

Here's some code to resize the columns in a sub-form or cross reference grid.  Archer 6.9. SP2.

You'll have to Inspect Element and find the last characters of the grid table's ID for this.

Column numbering starts at 1, so you'll have to adjust the code for your number of columns and their widths.

 

<script type="text/javascript">
Sys.Application.add_load( function() {

    var column = 1;
    // put the end of the table ID here
    $('table[id$="_f21081srvgrid_ctl00"] thead tr').children().each( function() {
        if( column == 1 ) { 
            $(this).css( 'width', '10%' );
        } else if( column == 2 ) { 
            $(this).css( 'width', '15%' );
        } else if( column == 3 ) { 
            $(this).css( 'width', '10%' );
        } else if( column == 4 ) { 
            $(this).css( 'width', '25%' );
        } else if( column == 5 ) { 
            $(this).css( 'width', '10%' );
        } else {
            $(this).css( 'width', '15%' );
        }
        column += 1;
    });

} );
</script>

 

 

Rus

 

 

 

0 REPLIES 0