show hide header

Dear Support Team!

I would like show/hide header filter dinamyc.
grid=>

var visible=0;
.......
grid.setHeader("iktatasID,Iktatószám,Irány,Biz.Hogyan Érk.,Biz.Hogyan Ment.,Beérkezés Dátum,Partner,Iktatás típusa,Megnevezés,Ugyintézés,Megjegyzés,Létrehozó,Létrehozás,Modosító,Modosítás");
	//grid.attachHeader(" ,#text_filter,#select_filter,#select_filter,#select_filter, ,#text_filter, ,#cspan,#cspan");
blind_hidden();

blind_hidden =>

function blind_hidden(){
	if(visible == 0){
		visible = 1;
		grid.attachHeader(" ,#text_filter,#select_filter,#select_filter,#select_filter, ,#text_filter, ,#cspan,#cspan");
		alert(visible);
	}
	else{
		alert('a');
     grid.detachHeader(1);
	 visible = 0;
	}
}

Thanks for your help

Thanx, aspirany. Your code looks pretty well.
If have issue that sssociated with this sample, please let us know.

thanks for your fast and deep answer.
Sorry but i haven’t any clue.
I hope you have any idea.

Best regards .

Can you please send us more information regarding this issue?
What steps to reproduce it?
What is happening and what is expected behaviour for you?

Thank you Olga.

I would like show/hide header filter when i click button.

My code is work partialy. When i click the button first detach work perfect.
When I click secound the attach don’t work again the filter in header don’t show.

Here is the all code

<script type="text/javascript">
var visible = 0;
var grid = new dhtmlXGridObject('gridbox_<?php echo $ID;?>');

    grid.setImagePath("<?php echo base_url();?>codebase/imgs/");
	grid.setHeader("iktatasID,Iktatószám,Irány,Biz.Hogyan Érk.,Biz.Hogyan Ment.,Beérkezés Dátum,Partner,Iktatás típusa,Megnevezés,Ugyintézés,Megjegyzés,Létrehozó,Létrehozás,Modosító,Modosítás");
	blind_hidden();
	grid.setInitWidths("0,150,100,80,80,80,80,200,50,150,100,80,80,80,80");
	grid.setColAlign("center,center,center,center,center,center,center,center,center,center,center,center,center,center,center");
	grid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
	grid.setColSorting("int,str,str,str,str,date,str,str,str,str,str,str,date,str,date");
	grid.attachEvent("onRowDblClicked", doOnRowDblClicked);
	grid.init();
	grid.enableLightMouseNavigation(true);
	grid.setSkin("dhx_skyblue");
	grid.enableSmartRendering(true,50);
	grid.loadXML("<?php echo base_url();?>index.php/gridxml/index/iktatas_grid");

var toolbar = new dhtmlXToolbarObject("toolbarObj_<?php echo $ID;?>
");
toolbar.attachEvent("onClick",tab_toolbar_click);
toolbar.setIconsPath("/infobase_web/dhtmlx/toolbar/img/");
toolbar.loadXML("<?php echo base_url();?>index.php/toolbarxml/toolbar_xml/iktatas_grid");

function blind_hidden(){
	if(visible == 0){
		visible = 1;
		grid.attachHeader("&nbsp;,#text_filter,#select_filter,#select_filter,#select_filter,&nbsp;,#text_filter,&nbsp;,#cspan,#cspan");
	}
	else{
             grid.detachHeader(1);
	 visible = 0;
	}
}

function doOnRowDblClicked(rowId){
grid.getRowIndex(grid.getSelectedId());
		id=rowId+1;
		
		var iktatasID = grid.cells(grid.getSelectedId(id),0).getValue();
		var sorszam =  grid.cells(grid.getSelectedId(id),1).getValue();
		
		parent.dba.create_tab('Iktatas','Iktatás',iktatasID);
	}	

function tab_toolbar_click(id){
	switch(id){
		case "close":
		var id=parent.dba.tabbar.getActiveTab();
        parent.dba.tabbar.removeTab(id,true);
		 break;
		case "refresh_table":
		grid.updateFromXML("<?php echo base_url();?>index.php/gridxml/index/iktatas_grid");
		 break;
		case "filter":
		blind_hidden();
		default:
		 break;
		}
	};
</script>