Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Craig Efrein on Jan 15, 2009 03:01
open dhtmlx forum
Check Grid for cells with empty or null values

Hello again,

I would like to know if there is an easy way to check an entire grid for empty values. So imagine that I have a grid with 3 rows and 4 columns. No value was entered in the 2nd row 1st column. How can I go through each row in the grid and determine which cells are empty.

I want to the tell the user that the cell in the 2nd Row 1st column needs to be filled.

thanks,
Craig
Answer posted by Support on Jan 15, 2009 04:17
you can use 

grid.forEachRow(function(id){
   grid.forEachCell(id,function(cell,ind){
          if (cell.getValue()=="") alert("cell at "+id+","+ind+"is empty");
   })
})