onrowselect funtion doesnt load everything

i’m using this function:
dhxGrid.attachEvent(“onRowSelect”, patient_selected);

and when i click a row, some things dont load, for example some grid rows (bottom rows), and the header doesnt hide, when i click the same row again, or another row, it works perfect.

I don’t know whats wrong, could someone help me with this please?

function:

function patient_selected(PatNum, index) {

dhxLayout.cells(“c”).expand();
inLayout = new dhtmlXLayoutObject(dhxLayout.cells(“c”), “2U”);
dhxLayout.cells(“c”).hideHeader();
dhxTabbar = inLayout.cells(“a”).attachTabbar();
dhxTabbar.addTab(“a1”, “Testtab”, “80px”);

PatientGrid = dhxTabbar.cells(“a1”).attachGrid();
PatientGrid.setHeader(",");
PatientGrid.setInitWidths(“20,150,200,80,*”)
PatientGrid.setColAlign(“left,right,left,left,left”)
PatientGrid.setColSorting(“int,int,str,int,str”);
PatientGrid.setColTypes(“ro,ro,ro,ro,ro”);
PatientGrid.setNoHeader(true);
PatientGrid.init();
PatientGrid.loadXML(“inc/xml/list.php?PatNum=”+ PatNum +"");
PatientGrid.enableSmartRendering(true);
}

thnx in advance!

I don’t know if what I am seeing on my project is effecting you or not. The event “onRowSelect” gets fired more then the one time that you might think it does. For me, it gets fired every time I move the cursor over the row, and does not wait for me to click the row. So you might be clobbering yourself with subsequent calls. Just something to look for.

it looks like it only starts when i click a row, its just doesnt the the whole function the first time, it skips some things, the second the time i click a row, and all the times after that, it works

What version of dhtmlxGrid are you using? At what browser does the issue occur?