Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Oksana Yakusheva on Sep 26, 2008 14:16
open dhtmlx forum
set editable rows

Hi-,
Is it possible to have different data access on different rows?

For example, I have 2 rows, but user can edit data only in one of them.
If it's possible, how to set it up?


Thanks,
Oksana
Answer posted by Stanislav on Sep 29, 2008 15:08
You can just lock the row which must not be editable, can be done by locked attribute in xml ( <row locked="true" )  or grid.lockRow command. Locked row can't be edited, without relation to column types. 

In most complex scenarious , you can use per-cell types, something similar to next

<rows>
<row id="1"><cell type="ro">Readonly</cell></row>
<row id="2"><cell type="ed">Editable</cell></row>
</rows>

The type attribute sets type of cell, so you can have editable and readonly cells in the same column