Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ashwin Suresh on Jun 04, 2009 23:50
open dhtmlx forum
DHTMLX Grid - TextArea

If in a grid,one column is of textarea type,ie.type="txt",and suppose if we want to make it readonly after the focus is moved out of that cell,That we have implemented using editStop function.Now my question to you if I enter multiple lines (say 10 lines) in that text area and move out,since now it will become readonly the data entered in 10 lines will now appear as a single line with white spaces in between.For instance, Note1,Note2,Note 3 are entered in 3 seperate lines in the text area and I come out of that field,I can see as Note1 Note 2 Note 3.But not as Note1
Note2
Note3
How can I see the text area field with multiple lines entered even if it is readonly?Please guide.
Answer posted by Support on Jun 05, 2009 02:19
You can use next code to make the cell readonly
           mygrid.cells(row_id,cell_index).setDisabled(true)
after such code cell will look as normal one ( it will preserve multiline content in case of txt column type ) but will not be editable anymore.

Also, please be sure that multiline mode enabled in grid (mygrid.enableMultiline) it is necessary to render multi-line content