ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: omerix on March 21, 2019, 05:45:48 pm
-
Hello,
How do I get the ID number of the selected fields?
https://yadi.sk/i/cp5BSgn7Bpdrew
Console.log () is enough
-
Ex: https://paramquery.com/pro/demos/selection_cell
Cell selections are rectangular in shape.
selectChange event provides selection information in form of beginning rowIndx (r1) to end rowIndx (r2) and beginning colIndx (c1) to end colIndx (c2)
[{"r1":3,"c1":5,"firstR":3,"firstC":5,"r2":3,"c2":5,"rc":null,"cc":null,"type":"cell"}]
-
Hello,
I got the "ID" of the selected records. I assigned it to "Input.value".
But how do I get the "dataIndx" information of the selected records? (getCellHeader, gettCell etc.?)
,selectChange: function (evt, ui) {
var selectJson=JSON.stringify(ui.selection.address());
var selectArray=JSON.parse(selectJson);
var selected=selectArray[0];
if (selected==undefined){} else{
var rowStart=selected.r1;var rowStop=selected.r2;var cellStart=selected.c1;var cellStop=selected.c2;
$('#r1').val(rowStart);$('#r2').val(rowStop);$('#c1').val(cellStart);$('#c2').val(cellStop);
var selectedValue=[];
for (i = rowStart; i <= rowStop; i++) {selectedValue.push(grid.getRowData({rowIndx:i})['ID']);}
$('#dtaLabel').val('TODO-Coll.DataIndx');
$('#dtaValue').val(selectedValue.join());
}}
-
dataIndx can be obtained from colIndx
grid.getColModel()[ cellStart ].dataIndx;
-
Thanks param.
dataIndx can be obtained from colIndx
grid.getColModel()[ cellStart ].dataIndx;