﻿derive(InputTableData, ClassDataInput);
function InputTableData() {

    this.EmptySelection = true;
    
    this.RenderSelection = function(aMark) {
        var lsel_index = this.get_SelectedIndex();
        if(typeof(lsel_index) == 'object') {
            for(var i = 0; i < this.get_DataKeys().length; i++) {
                var lref = document.getElementById(this.ClientId + 'chk' + i);
                if(lref)
                    lref.checked = false;
            }
            for(var i = 0; i < lsel_index.length; i++) {
                var lref = document.getElementById(this.ClientId + 'chk' + lsel_index[i]);
                if(lref)
                    lref.checked = aMark;
            }
        } else {
            var lref = document.getElementById(this.ClientId + 'chk' + lsel_index);
            if(lref)
                lref.checked = aMark;
        }
    }
    
    this.set_Focus = function() {
        var lref = document.getElementById(this.ClientId + 'chk0');
        if(lref)
            lref.focus();
    }
    
}


