copy cell data to input field using onRowDblClicked

Hello, I’m trying to copy the rowId and one cell into two input fields however I am not sure how to get the cell data. When someone double clicks on a row it grabs the rowId and pastes it into the billing_address input field fine, but I would also like it get the vendor name and paste it into vendor_name_shipping. Could someone explain how this would work?

Thanks

Here is the code I have so far

<script>
function copyBilling(rowId, cellInd) 
{
document.getElementById("billing_address").value=rowId;
document.getElementById("vendor_name_shipping").value=cellInd;
}

grid1 = new dhtmlXGridObject('vendors');
grid1.setImagePath("dhtmlx/dhtmlxGrid/codebase/imgs/");
grid1.setHeader("Billing Account, Vendor Name, Address, City, Province, Postal Code, Service Group");
grid1.attachHeader("#text_search,#text_search,#combo_filter,#combo_filter,#combo_filter,#combo_filter,#combo_filter");
grid1.setInitWidths("100,100,100,100,100,100,100");
grid1.enableAutoWidth(true);
grid1.setColAlign("left,left,left,left,left,left,left");
grid1.setColTypes("ro,ro,ro,ro,ro,ro,ro");
grid1.setColSorting("int,str,str,str,str,str,str");
grid1.getCombo(5).put(2, 2);
grid1.setSkin("dhx_web");
grid1.attachEvent("onRowDblClicked", copyBilling);
grid1.load("connectors/vendor_connector.php");
grid1.init();
</script>

you can get the cell data using the getValue() method.
val=mygrid.cells(row_id,col_ind).getValue();