Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by sachin on Jun 03, 2009 23:13
open dhtmlx forum
dataSourceGrid.setRowHidden(i,true);

function dataSourcePopupHandler(id) {
alert("the id inside the dataSourcePopupHandler is ---->"+id);
     doInitDataSourceGrid();
     alert("the id after the dataSourceGrid initialization is ---->"+id);
     for(var i=0; i<dataSourceGrid.getRowsNum(); i++){
         if(id != i){
            dataSourceGrid.setRowHidden(i,true);
        }else{

dataSourceGrid.setRowHidden(id,false);
        }
     }


The above function gets called on click of a particular button .The id is passes to the function .I just want to display the rows which containt the id .However once the row is set Hidded to false it remains false inspite of setting it to true and shows up on the second call to the function .
Answer posted by dhxSupport on Jun 04, 2009 01:57
To display rows which contain id better to use filtration:

function dataSourcePopupHandler(id) { 

alert("the id inside the dataSourcePopupHandler is ---->"+id); 
  doInitDataSourceGrid(); 
  alert("the id after the dataSourceGrid initialization is ---->"+id); 
  dataSourceGrid.filterBy(INDEX,id,true);
  }

Please see more information here http://www.dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Data_filtering_search.html#grid_fsing