Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ramesh on Apr 04, 2008 05:27
open dhtmlx forum
Urgent Help Reqd

Hi,
Could you please provide me the code in Javascript which will read the entire grid, find the editable cells and display their values?
I was exploring the APIs and didnt find any method to find whether a cell is editable or not.
Answer posted by Support on Apr 04, 2008 10:27
Basically the editability of cell defined by column type, but you can use next method as well

grid.forEachRow(function(id){
     grid.forEachCell(id,function(c){
          if (!c.isDisabled())
             alert(c.getValue());
     });
});


isDisabled method of excell returns true for readonly types
Answer posted by ramesh on Apr 04, 2008 23:02
But this code is not working. I am getting the Javascript error : " Object doesnt support this property or method."
Answer posted by Support on Apr 07, 2008 05:54
The code of function is correct, and works pretty fine in local sample.
Please be sure that you are used your grid pointer variable instead of "grid" in snippet above.
( you can contact us directly at support@dhtmlx.com if you need full sample code )