Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Sep 19, 2007 15:33
open dhtmlx forum
Hi I am using dhtmlxGrid_v14_Pro_70813 professional version, Q)I have a string in grid's cell in following format, userInputTxt1 + someItemNumber + userInputTxt2 I want to set color of "someItemNumber" string only and not the whole cell value.After editing it should not display any html tags in cell editor.How can I do that? Q)Also how can I set cell value in edit mode(when stage==1) so that editor should remain open? I tried mygrid.cells(rowId,cellInd).setValue(userTxt1); but it closes the editor. Q)Is there any way to get editor object?


Answer posted by Stanislav on Sep 20, 2007 14:54
>>Is there a way to get editor object

Current active editor grid.editor

>>Set value of active editor

In most case it will be available as grid.editor.obj ( but not in all , this is not strict rule )
grid.edotor.obj.value="new text";

>>I want to set color of "someItemNumber"

You can access html node of cell as

grid.cells(i,j).cell

and do any direct manipulation with HTML
More complex approach - creating custom exCell, where you can define as item will look in normal and edit states as well as formatting|coloring rules or custom methods.