3.2.0

how do I keep data in a second grid on a refresh?

I have 2 grids, choosing a row in the first grid fires off a query that returns data which is supposed to populate into the second grid. The data gets returned and populated correctly but the object refresh of the second grid wipes it all out so I'm left with nothing. Here's a snippet of the code that does what I'm talking about:

Is there something other than the .refresh() I can use that won't wipe out the data in the rows?

function select()
{
var patient_id = obj1.getDataProperty("text", row, 0)

document.submitID.pati_id.value = patient_id;
document.submitID.submit();

obj2.setColumnCount(columns2.length);
obj2.setRowCount(<%=rsTwoCount.Fields.Item(0).Value%>);
obj2.setColumnProperty("text", function(i){return columns2[i]});
obj2.setDataProperty("text", function(i, j){return data2[i][j]});

obj2.refresh();
}

Thanks!
-HLAB
September 15,
I figured it out....


obj2.setColumnCount(columns2.length);
obj2.setRowCount(<%=rsTwoCount.Fields.Item(0).Value%>);
obj2.setColumnProperty("text", function(i){return columns2[i]});
obj2.setDataProperty("text", function(i, j){return data2[i][j]});

function select()
{
var patient_id = obj1.getDataProperty("text", row, 0)
document.submitID.pati_id.value = patient_id;
document.submitID.submit();
obj2.refresh();
}

-HLAB
September 16,
thei
September 20,

This topic is archived.

See also:


Back to support forum