DTMLX Object Initilization master_checkbox not working

HI,

i initialize the grid using object initilization

jsonData.header =
columns:[
{ label:[“Document Title”, “#text_filter”], id:“001”, width:150, type:“ed” },
{ label:[“Category”, “#select_filter_strict”], id:“002”, width:150, type:“coro” },
{ label:[“Date Uploaded”, “#text_filter”], id:“003”, width:150, type:“ro” },
{ label:[“Uploaded By”, “#text_filter”], id:“004”, width:150, type:“ro” },
{ label:["","#text_filter"] , id:“005”, width:150, type:“ro” }
],

headerData = ({
image_path: documentContext + “/jslib/dhtmlx/imgs/”,
skin: “dhx_black”,
smart_rendering: true,
auto_height: true,
auto_width: true,
parent:“btngridboxSearchResults”,
columns:jsonData.Header,
submit_changed:true
});

agrid = new dhtmlXGridObject(headerData);
addCommonColumns();

agrid.parse(jsonData.gridData,"json");

function addCommonColumns() {

agrid.insertColumn(0,'#master_checkbox','ch',25);
agrid.insertColumn(agrid.getColumnsNum() + 1,'','',25);

}

the function addCommonColumns places the master check_box in the header but the events associated worth it are not getting fired

also the table has 2 rows , its showing checkboxes properly but here also event is not getting registered

please help!

Found the solution the problem was that _in_header_master_checkbox loads with original index you specify in insert column where as it order + 1 of the coloumns num of the grid. This created the problem so i did the below to reset the coloumn order

agrid.insertColumn(agrid.getColumnsNum() + 1,’#master_checkbox’,‘ch’,25);
agrid.moveColumn(agrid.getColumnsNum() - 1, 0);

now it gets value of c variable properly in method
a.getElementsByTagName(“input”)[0].onclick=function(a)