Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Aug 26, 2008 06:34
open dhtmlx forum
Two grids on the same page

I have 2 grids on a page. There are two columns in the first grid one of type ed and the other of type link. All the values of the link column are "select row" so when the user clicks on the link of a perticular row i would like to make grid 2 visible (grid 2 loads based on the selected row in the 1st grid) and also i would linke the focus to move to grid 2. The ed column value for a perticular row should be greater than 10 inorder for grid 2 to be visible. That is even if the users click on the "select row" link and if the value of ed cell for the pertucular row is less than 10 then an alert should popup and grid2 should not open. Can this be done?
Answer posted by Support on Aug 26, 2008 07:20
 - change type of second column to ro 
 - add next code to the grid

grid.attachEvent("onRowSelect",function(id){
    if (grid.cells(id,0).getValue()<10){
          grid2.loadXML("some.php?for="+id);
          grid2.setActive();
    }
    return true;
});