Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Janani on Mar 20, 2009 04:11
open dhtmlx forum
Master Checkbox

Hi,

I need to display the master check box along with the header (beside the title of each colomn).

I have added the code

mygrid.attachHeader("#master_checkbox,#rspan,#rspan,#rspan,#rspan");

This displays the master checkbox in a separate row its self like

-------------------------------
| Select | Name | Color |
-------------------------------
| [] | | |
-------------------------------
-------------------------------
| [] | jan | blue |
-------------------------------
-------------------------------
| [] | feb | red |
-------------------------------

but we need to be displayed as

-------------------------------
| Select [] | Name | Color |
-------------------------------
-------------------------------
| [] | jan | blue |
-------------------------------
-------------------------------
| [] | feb | red |
-------------------------------


Can you help me out in this.

Regrads

Janani
Answer posted by dhxSupport on Mar 20, 2009 05:21

It can be done only with code modification. 

in dhtmlxgrid_filter.js

dhtmlXGridObject.prototype._in_header_master_checkbox=function(t,i,c){
 t.innerHTML=c[0]+"<input type='checkbox' />"+c[1];

could be replaced by that:

dhtmlXGridObject.prototype._in_header_master_checkbox=function(t,i,c){
 t.innerHTML=c[0]+"Select <input type='checkbox' />"+c[1];