Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by CW on Apr 23, 2008 14:41
open dhtmlx forum
Exception sorting grid

running the script

<script>
     gridNennung = new dhtmlXGridObject('gridNennung');
     gridNennung.setImagePath("./libs/dhtmlxSuite/dhtmlxGrid/codebase/imgs/");
     gridNennung.setSkin("light");
     //gridNennung.setColSorting("str,str,str");
     gridNennung.init();
     gridNennung.loadXML("./xml/Nennlisten/2008_Club_Frei.xml");
     gridNennung.sortRows(0, 'str', 'asc');    
</script>

I get the following exception when sortRows() is executed:

Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsSessionStore.js :: sss_saveState :: line 1753" data: no]

removing the sortRows call everything works fine (except the initial sort order)

pls help
ty
Answer posted by Support on Apr 24, 2008 03:23
The grid loading is async, so you must call any commands against grid only after data loaded
     gridNennung.loadXML("./xml/Nennlisten/2008_Club_Frei.xml",function(){
         gridNennung.sortRows(0, 'str', 'asc');    
    });