One, make a row a column cell disabled:
1. Unistringgrid Options, goediting = True
2. Add Event Beforeedit, Unistringgrid, extevents
function beforeedit(editor, context, eOpts) {
var FixedRow, FixedCols;
FixedRow = 1;
FixedCols = 1;
if (editor.cmp.uniRow < FixedRow || editor.cmp.uniCol < FixedCols) {
return false;
}
}
It can be used also in UniDBGrid, to lock some cells ...
Second, get the cell value when the client clicks Unigrid:
Hi wxb_km. Basically, your question should be solved as follows:
1. Need to use the function
Cellclick(sender, metaData, TD, CellIndex, record, tr, RowIndex, e, eopts)
2. Here cellindex -is the column index and rowIndex -The index of the row. Http://docs.sencha.c...event-cellclick
3. And use it to get the value:
Sender. Store. GetAt(rowIndex). Get(cellindex)
i.e.:
function cellclick(sender, metaData, td, cellIndex, record, tr, rowIndex, e, eOpts) {
alert(sender.store.getAt(rowIndex).get(cellIndex));
}
But in my case (I use Unigui 0.94.0.1023, under certain circumstances), I think some of the variables swapped!
For me works if I do:
function cellclick(sender, metaData, td, cellIndex, record, tr, rowIndex, e, eOpts)
{
alert(sender.store.getAt(tr).get(td));
}
Or:
function cellclick(sender, metaData, TD, CellIndex, record, TR, rowIndex, e, eopts) {
var fieldname=sender.getgridcolumns () [Cellindex].dataindex;
Alert (Record.get (fieldname));
}