Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ravi Relangi on Aug 30, 2007 19:55
open dhtmlx forum
dynamic enabling and disabling of cells based on the value in the other cell

We need to implement the validations (both client and server side) which includes dynamic enabling and disabling of cells based on the value in the other cell. But we don’t know how to implement validations in the DHTML grid. It would be of great help, if you can provide some guidance on the same.
Answer posted by Stanislav on Sep 05, 2007 18:21
on client side you can use onCellChanged event to implement such functionality
something similar to next

    grid.attachEvent("onCellChanged",function(rid,cind,value){
             if (rid==some || cind==some || value=some)
                   grid.cells(rid,cind).setDisabled(true);
             return true;
    });



basically this event fire for any data change, and based on row Id, cell index and new value you can update grid in desired way ( setDisabled switch any cellto readonly mode )