Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Stan on Oct 11, 2007 00:07
open dhtmlx forum
Number Format for ReadOnly Cell type

How can I apply a number format to cell wich is in a view only mode?

Current pro-format example explains the edit mode. I have tried the "ro" type with the format="0,000" but it is not working.

Here is what I tried:

<rows>
<head>
<column width="70" format="0,000" type="ro" id="xyz">Amount</column>

...



Please, adivse.

Thank you,
Stan.
Answer posted on Oct 11, 2007 11:27
In current version format can be applied only to edn excell , but you can use next way

<rows>
<head>
<column width="70" format="0,000" type="edn" id="xyz">Amount</column>

and in js initialization code

grid.attachEvent("onEditCell",function(stage,rid,cind){
    if (cind==INDEX) return false;
    return true;
});

where INDEX - index of column which must be readonly
Answer posted by Stan on Oct 11, 2007 16:44

Thank you for the advice, it works great!

Stan.