checkboxes instead of multiselect

Anyone already implement checkboxes to support multiselect (including an all/nothing checkbox in th columnheader)

March 21,
Exactly what i'm looking for too.If somebody has an implementation it will be great. :)
June 18,
Has anyone found a solution for this as im yet another person trying to work it out :)

Matthew Byrne
August 21,
If this were to be posted, I would definetly implement it.
March 15,
for the cell value, try giving it the html tags of the control you want appear in the cell. It works for me.

However, sorting doesn't seem to work with the value of the control.
Kiet Tran
March 15,
to see it working: http://webmail.mbn.ch/table/dyntable.php
the code is http://webmail.mbn.ch/table/multiselect.js (and eventlib.js)

it works technically, but must be designed (hpos and vpos).
[b]I have no clue how to add the toggle button into the top-left corner of the grid.[/b}

// gridasGridObj is a pointer to the grid Object
//  myData is the dataArray
var checkArr = new Array(); // here is the result

function multiCheck(){ // this function onload
    var id = gridasGridObj.getId();
    var count = myData.length;
    var ptr= document.getElementById(id+".layout/left"); //hack to get the numCol
    for(var i=0; i<count; i++){
        var p = document.getElementById(id+".left.item:"+i+"/box");
        var iX= document.createElement("INPUT");
        iX.setAttribute("type", "checkbox");
        iX.setAttribute("row", i);
        iX.id ="chk_"+i;
        addEvent(iX, "click", toggleOne); // crossbrowser_lib
        var pf = p.appendChild(iX);

function toggleAll(){
    var count = myData.length;
    for(var i=0; i<count; i++){
        checkArr[i] = (checkArr[i]) ? false : true;
        var p = document.getElementById("chk_"+i);
        p.checked = checkArr[i];
function toggleOne(e){
    var xthis = (window.event) ? window.event.srcElement : this;
    checkArr[xthis.getAttribute("row")] = xthis.checked

Andres Obrero [Winterthur]
March 15,
Andres, if you want to change the top-left corner you can do the following:

if (obj.getSelectionProperty("multiple")){
var ix= document.createElement("INPUT");
ix.setAttribute("type", "checkbox");
var layout = obj.getTemplate("layout");
var corner = layout.getContent("corner");
var cornerBox = corner.getContent("box");
Jorge Muza ( jorge [at] muza.com.mx )
October 3,

This topic is archived.

See also:

Back to support forum