Author Topic: Set the width of the sub-grid columns  (Read 3079 times)

nuno.nogueira

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 95
    • View Profile
Set the width of the sub-grid columns
« on: March 18, 2014, 06:17:49 pm »
I have a variable larguraJanela to hold the width of the parent container of my grid.

This variable is adjusted automatically everytime the window width changes, so the view of the table is responsive.

It all works fine, except the width of the columns of the sub-grid.

No matter what width I set, they do not seem to bother. It's like they choose what width they want.

Here's a sample of the code:

[code]
var $grid = {
        width: larguraJanela, //900,
        height: 300,
        flexHeight: true,
        collapsible: false,
        wrap: false,
        hwrap: false,
        resizable: false,
        rowBorders: false,
        numberCell: {
            show: false
        },
        track: true, //to turn on the track changes.
        scrollModel: {
            autoFit: true
        },
        selectionModel: {
            type: ''
        },
        //hoverMode: 'row',
        editModel: {
            saveKey: $.ui.keyCode.ENTER
        },
        showTitle: false,
        showBottom: false,
        //title: "<b>Detalhes dos registos</b>",
        colModel: [{
            title: "id",
            dataType: "integer",
            dataIndx: "id",
            editable: false,
            hidden: true
        }, {
            title: "Data",
            width: 0.015*larguraJanela, //15,
            dataType: "string",
            dataIndx: "data",
            align: "right",
            resizable:false,

  (...)

{
            title: "Conta",
            width: 0.03*larguraJanela, //25,
            dataType: "string",
            dataIndx: "nome_conta",
            align: "right",
            resizable:false,
            editor: {
                type: autoCompleteEditor
            },
            validations: [{
                type: 'minLen',
                value: '1',
                msg: 'Obrigat