how to get row selected on load?

hi, I need some help on my script.
i use dhtmlxgrid and in my php script when i click on a “open” link which contain a url variable which is customer id. and when clicked it will open a new window which contain dhtmlxgrid with all customer listed in the grid.

something like this

window.open('cust_form.php?custcode='+document.getElementById("custcode").value,'customerpopup','toolbar=no,alwaysRaised=yes,width=620,height=620,status=no,scrollbars=yes,resize=no');return false

the url variable (custcode) is to pass to myxml.php script in order to get row selected if the value match the url variable. something like this

if($row[CustCode] == $_GET[custcode])
		$sel="selected='1'";
		else
		$sel="";
		//create xml tag for grid's row
		echo ("<row $sel id='".$i."'>");
		print("<cell><![CDATA[".$row['CustCode']."]]></cell>");
		print("<cell><![CDATA[".$row['CustName']."]]></cell>");

i first didn’t use smartrendering mode and the row selected correctly according to the variable passed but the grid loads extreamly slow. then i try smartrendering mode but i can’t get the row selected. I must scroll down until the record that match the variable display then the row is selected.

please help me.

thank you so much

To select row with api, appropriate row should be rendered. If you want select row and show it you may use following code:

mygrid.load(url,fucntion(){
mygrid._row(row_index)
mygrid.selectRow(row_index)
})