Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on May 13, 2009 00:46
open dhtmlx forum
groupby

1. how can i get group index when i expand / collapse group ?
2.
<script>
crArray[0]="05";crArray[1]="15";crArray[2]="25";
function clickMe(){
var i=-1;
mygrid.customGroupFormat=function(name,count){
            ++i;
                name = name + " " + crArray[i];
            }
            return name + " " + crArray[i];
}
mygrid.groupBy(1);
</script>

in above script i am getting dynamic values from my array in each group row .
but when i expand / collapse i can't.
is there any way to get these values ??

Answer posted by dhxSupport on May 13, 2009 02:00

To get name when group expanding\collapsing you can use even "onGroupStateChanged". Event handler has parameters:

value - key value of group
state - {bool} open state, true - opened

grid.attachEvent("onGroupStateChanged", function(value,state){
  //any custom logic here
  });