Hi all,
I need to do a simple action but implement is quiet difficult.
i have a grid with attachHeader (’#personnal_master_checkbox’,…)
then i need to select all into the current page of my grid and only the current page.
checking all the row into the current page is ok
dhtmlXGridObject.prototype._in_header_personnal_master_checkbox=function(t,i,c){
t.innerHTML=c[0]+""+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;
}
}
My problem is when i change page, i still have the position of the checkbox from the last page action. Sample :
- i click the checkbox on page 1
- action OK all row from page 1 are selected
- i go to page 2
4)all row from page 1 are still selected ( it’s ok ), all row of page 2 are unselected ( OK ) but the header is not updated and still checked
So to check all the page 2 i have to unselect the header then to check it again.
My question is how to update the attachHeader Object on page Change.
Thanks for your answer.
Regards