I would like to know if there is a way of selecting (by checking with a master check) all the rows of the actual page.
Thanks anyway
I would like to know if there is a way of selecting (by checking with a master check) all the rows of the actual page.
Thanks anyway
By default master_checkbox checks only rendered rows. In case of paging only rows from opened pages are rendered. To check rows only from one visible page with master_checkbox you should modify dhtmlxgrid_filter.js file.
Starting from
dhtmlXGridObject.prototype._in_header_master_checkbox=function(t,i,c){
you can place following code:
dhtmlXGridObject.prototype._in_header_master_checkbox=function(t,i,c){
t.innerHTML=c[0]+"<input type='checkbox' />"+c[1];
var self=this;
t.firstChild.onclick=function(e){
self._build_m_order();
var j=self._m_order?self._m_order[i]:i;
var val=this.checked?1:0;
var state=self.getStateOfView();
for (var k=state[1]; k<state[2]; k++){
var c=self.cellById(self.getRowId(k),j);
if (c.isCheckbox()) c.setValue(val);
}
(e||event).cancelBubble=true;
}
}