warner
June 29, 2010, 2:34pm
#1
Hello
i got a problem.
if i group my grid with this code:
mygrid.customGroupFormat = function(text, count) {
return "" + text + " (Anzahl " + count + ")";
};
and the column i use is type = ch. It will display for “text” the value of the checkbox. But i need the “name”.
Because my values are numbers. (And nobody knows what the number stands for)
How is it possible to get the names instead of the values, to show in grouping?
Thanks for any help
Olga
June 30, 2010, 9:24am
#2
What do you mean under “name” of “ch” cell? “text” variable is equal to the value of the cell.
warner
June 30, 2010, 9:45am
#3
Sorry i meant combo box like this:
mygrid.getCombo(4).put(0,"paper");
mygrid.getCombo(4).put(1,"flyer");
mygrid.getCombo(4).put(2,"folder");
If i now group with this CustomGroupFormat:
mygrid.customGroupFormat = function(text, count) {
return "" + text + " (number" + count + ")";
};
It shows me “0 (number 23)”. But i need for example “paper(number 23)”
Is this possible?
Olga
July 1, 2010, 9:33am
#4
You can get label of combo box option by it’s id with following code
var label = grid.getCombo(index).get(text)
where index - index of a column