Author Topic: Identifying RowID  (Read 3587 times)

Steff

  • Newbie
  • *
  • Posts: 4
    • View Profile
Identifying RowID
« on: March 05, 2015, 12:30:48 pm »
Hi
Is there a working example with ParamQuery, which does the same as example below?
http://www.ok-soft-gmbh.com/jqGrid/GetIdsOfCheckboxes.htm

Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Identifying RowID
« Reply #1 on: March 05, 2015, 03:29:40 pm »
That's quite simple with paramquery, please check this jsfiddle.

http://jsfiddle.net/aLr61v3j/

Steff

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Identifying RowID
« Reply #2 on: March 07, 2015, 12:05:46 am »
Thank you for your support. 
My data is held in an array and the checked value is not in the array, nor in the underlying database.

So here is what I made out of it... It is working and OK for me while prototyping.
I am sure there would be a nice solution to it.

$("#get_id").click(function (evt) {
                var checked = [];
                var data = $("#grid_rowhover").pqGrid('option', 'dataModel.data');
                for (var i = 0; i < data.length; i++) {
                    var rowDataByName = data;
                    var rowData = [];
                    for (var y = 0; y < data.length; y++)
                    {
                        if(y == 0)
                        {
                              rowData.push(data[0])
                        }
                    }

                    if (rowDataByName.state) {
                        checked.push(rowData[0]);
                    }
                }
                alert(checked);
            });

Thanks again

« Last Edit: March 07, 2015, 12:09:23 am by Steff »