jQWidgets Forums

jQuery UI Widgets Forums Grid Help: checboxes on a column and edit on row

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Help: checboxes on a column and edit on row #79451

    mazoom
    Participant

    I have a grid with three columns of type checkbox

    Here is the grid:

    $(“#jqxgrid”).jqxGrid(
    {
    width: 900,
    source: dataAdapter,
    editable: true,
    autoheight: false,
    autorowheight: true,
    autoheight: true,
    editable: true,
    altrows: false,
    selectionmode: ‘singlecell’,
    columnsheight: 25,

    columns:[
    {width: 65, text: ‘Minsan’, datafield: ‘Minsan’, editable: false, sortable: true, renderer: hrend1, cellsrenderer: crend1},
    {width: 220, text: ‘Prodotto’, datafield: ‘Prodotto’, editable: false, renderer: hrend1, cellsrenderer: crend2},
    {width: 70, text: ‘Stock<br/>11/12/2015’, datafield: ‘Stock’, editable: false, renderer: hrend1, cellsrenderer: crend1},
    {width: 50, text: ‘ultimi<br/>12 mesi’, columngroup: ‘Sellout’, datafield: ‘Sell12’, editable: false, renderer: hrend1, cellsrenderer: crend1},
    {width: 50, text: ‘prox<br/>mese’, columngroup: ‘Sellout’, datafield: ‘Sell1’, editable: false, renderer: hrend1, cellsrenderer: crend1},
    {width: 50, text: ‘prox<br/>3 mesi’, columngroup: ‘Sellout’, datafield: ‘Sell3’, editable: false, renderer: hrend1, cellsrenderer: crend1},
    {width: 70, text: ‘Fine<br/>scorta<br/>prevista’, datafield: ‘FineScorta’, cellsformat: ‘dd/mm/yyyy’, editable: false, renderer: hrend1, cellsrenderer: crend1},
    {width: 40, text: ’30g’, columngroup: ‘Copertura’, datafield: ’30g’, editable: false, renderer: hrend1, cellsrenderer: crend1},
    {width: 25, text: ”, datafield: ’30gs’, columngroup: ‘Copertura’, columntype: ‘checkbox’, renderer: hrend1},
    {width: 40, text: ’60g’, columngroup: ‘Copertura’, datafield: ’60g’, editable: false, renderer: hrend1, cellsrenderer: crend1},
    {width: 25, text: ”, datafield: ’60gs’, columngroup: ‘Copertura’, columntype: ‘checkbox’, renderer: hrend1},
    {width: 40, text: ’90g’, columngroup: ‘Copertura’, datafield: ’90g’, editable: false, renderer: hrend1, cellsrenderer: crend1},
    {width: 25, text: ”, datafield: ’90gs’, columngroup: ‘Copertura’, columntype: ‘checkbox’, renderer: hrend1},
    {width: 40, text: ‘Camp’, datafield: ‘Camp’, columntype: ‘checkbox’, renderer: hrend1},
    {width: 40, text: ‘Test’, datafield: ‘Test’, columntype: ‘checkbox’, renderer: hrend1},
    {width: 50, text: ‘Qta ord.’, datafield: ‘Qta’, renderer: hrend1, cellsrenderer: crend1, cellclassname: cellclass}
    ],

    columngroups:[
    {text: ‘Copertura proposta’, align: ‘center’, name: ‘Copertura’, cellsrenderer: crend1},
    {text: ‘Sellout’, align: ‘center’, name: ‘Sellout’}
    ]
    }
    );

    I need this:

    1. select/deselect all checkboxes in a column with a button
    2. on one row when I select a checkbox on a column i must assign the value of a cell of a column to another cell of another column
    3. on one row when I select a checkbox on a column I must deselect the checkboxes on the other columns

    Thanks

    Help: checboxes on a column and edit on row #79507

    Dimitar
    Participant

    Hello mazoom,

    When the state of a checkbox cell is changed, the cellendedit event is raised. In its handler you can call setcellvalue according to your requirements. Please note that setcellvalue can be used for checking and unchecking checkbox cells, too.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.