I'm trying to use checkbox with check/uncheck

I’m trying to use checkbox with check/uncheck…like rediff,yahoo…when the header checkbox is checked all the checkbox should check …and vice versa…

my code :

var xmlForGrid = ‘<?xml version=‘1.0’ encoding=‘UTF-8’?> <rows> <head> <column width=‘50’ type=‘ch’ align=‘center’>#master_checkbox</column> <column width=‘200’ type=‘ed’ align=‘left’><![CDATA[Environment Name<span style=‘color:red’></span>]]></column> <column width=‘380’ type=‘txt’ align=‘left’><![CDATA[Environment URL<span style=‘color:red’></span>]]></column><column width=‘0’ type=‘ro’ align=‘left’>Environment Id</column> <column width=‘300’ type=‘txt’ align=‘left’>Description</column></head></rows>’;

but it doesn’t work…pls give me a solution

The provided code is correct.
Please be sure that dhtmlxgrid_filter.js included in your html page ( without such file, the #master_checkbox marker will not convert to checkbox input )

Also, please beware, that functionality of master_checkbox limited in paging|smart_rendering mode - it will affect only rendered rows.

If problem still occurs for you - please provide more details about problem