on 04-04-2007 1:42 PM
What is wrong with this function? It almost seems that when I execute this Param.1 and Param.2 are dropped from this equation and the function tries to only pass Param.3 into the grid. Without Param.1 and 2 containing some data I return no data. When I test the query without 1 and 2, I get no results, but if I put % in both 1 and 2 I get my results. How do I pass multiple Params into this grid?
function UpdateDetails()
{
var Query = document.FR_ChemicalProcessing_UNGROUPED_Grid.getQueryObject();
var select1 = FR_ChemicalProcessing_GROUPED_Grid.getGridObject().getSelectedCellValue(1);
var select2 = FR_ChemicalProcessing_GROUPED_Grid.getGridObject().getSelectedCellValue(2);
var select3 = FR_ChemicalProcessing_GROUPED_Grid.getGridObject().getSelectedCellValue(3);
alert(select1);
alert(select2);
alert(select3);
//change the operator grid query filter
Query.setParam(1,select1);
Query.setParam(2,select2);
Query.setParam(3,select3);
document.FR_ChemicalProcessing_UNGROUPED_Grid.updateGrid(true);
}
Your code looks correct.
I assume that the alerts show the expected value?
If you enter those values in the Param.1, Param.2, and Param.3 in the Query Template Editor and test the query, does it work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This function looks right. I don't see why it wouldn't work. What does your page look like? Does the SelectionEvent on Grid1 update Grid2?
What does your query look like? Which mode are you using? What type of query is it? Can you post up a screenshot or the Fixed query SQL if it is one!?
Also to clean up your code a bit and follow a Best Practice approach:
function UpdateDetails() {
var Query = document.FR_ChemicalProcessing_UNGROUPED_Grid.getQueryObject();
var GroupedGrid = document.FR_ChemicalProcessing_GROUPED_Grid.getGridObject();
var select1 = GroupedGrid.getSelectedCellValueByName(COLNAME);
var select2 = GroupedGrid.getSelectedCellValueByName(COLNAME);
var select3 = GroupedGrid.getSelectedCellValueByName(COLNAME);
//use getSelectedCellValueByName("Col1Name") just in case something in the clumn order changes down the road.
//this just uses the column name instead of it's order number
alert("Sel1: " + select1 + " Sel2:" + select2 + " Sel3:" + select3);
//change the operator grid query filter
Query.setParam(1,select1);
Query.setParam(2,select2);
Query.setParam(3,select3);
document.FR_ChemicalProcessing_UNGROUPED_Grid.updateGrid(true);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.