Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by sunis on Oct 24, 2009 00:09
open dhtmlx forum
Having problem with the clist change event.

            NodeGrid= new dhtmlXGridObject('filter');
            NodeGrid.imgURL = "dhtmlxgrid/dhtmlxGrid/codebase/imgs/csh_bluebooks/";
            NodeGrid.setHeader("Level, Nodes");
            NodeGrid.setInitWidths("150,300");
            NodeGrid.setColTypes("ro,clist");
            NodeGrid.setSkin("light");
             NodeGrid.attachEvent("onEditCell", onChangeNodegrid);
            NodeGrid.setColSorting("int,str");
            NodeGrid.enableAutoWidth(true);
            NodeGrid.init();
            NodeGrid.loadXML("hierarchylist.do");

This is the code i am using, when ever i change the clist type i am not getting the right value from onEditCell nor from onCellChanged event.

onCellchanged event is giving the new_values correct, but its fired even though clist type is not changed ( just click on clist and dont change any thing inside and press apply button)
onEditCell (i am using if stage==2) is not giving the correct new_value .

Please advice what should i use,
Requirement is ........

Level1 ----- [n1,n2,n3] (select n1,n2) from level1 and i add a row level2 n4,n5 (childrens of n1,n2 (selected parent node) ).
Answer posted by dhxSupport on Oct 26, 2009 10:00
>>Level1 ----- [n1,n2,n3] (select n1,n2) from level1 and i add a row level2 n4,n5 (childrens of n1,n2 (selected parent node) ).
Unfortunately we cannot reproduce this issue locally. Can you please provide example where we can reproduce it? Please send such example directly to the support@dhtml.com
Answer posted by Stanislav (support) on Oct 26, 2009 10:18
>>onCellchanged event is giving the new_values correct, but its fired even though clist type is not changed 
Event fires when edit process finished and new value set for the cell. It doesn't matter is old and new value are technically equal - value changing operation was executed, so event was fired.