Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Steff

Pages: [1]
1
ParamQuery Pro Evaluation Support / Re: Delete multiple rows from grid
« on: April 06, 2015, 06:08:44 pm »
The  rowIndxs.reverse(); did the trick,
and obviously the index must be applied.

this line on its own did not work(I just forgot it in the example):
$("#grid_rowhover").pqGrid("deleteRow", { rowIndx: arrRowIndxs[ i ], track: false });

So thank you very much for your help

2
ParamQuery Pro Evaluation Support / Delete multiple rows from grid
« on: April 04, 2015, 04:13:20 pm »
Hi,

I need to delete multiple rows from grid.

I tried two solution according your references (see below). Unintentionally only the first record in the index array gets deleted from the grid.

Is there a solution for this problem?

Regards

function RemoveRecordsFromGrid(arrRowIndxs)
            {
                alert(arrRowIndxs.join('\n')); // e.g. [0,2]
                if (arrRowIndxs.length != 0)
                { 
                    for (var i = 0; i < arrRowIndxs.length; i++)
                    {
                        //----- Solution 1 ----------
                        $("#grid_rowhover").pqGrid("deleteRow", { rowIndx: arrRowIndxs, track: false });

                        //------ Solution 2 ----------
                        //var DM = $("#grid_rowhover").pqGrid("option", "dataModel");
                        //alert("REmoving row from Grid " + arrRowIndxs);
                        //DM.data.splice(arrRowIndxs, 1);
                        //$("#grid_rowhover").pqGrid("refreshDataAndView");
                        //$("#grid_rowhover").pqGrid("setSelection", { rowIndx: arrRowIndxs });
                    }
                }
                else
                {
                    alert("No Records to Remove");
                }
            }

3
ParamQuery Pro Evaluation Support / Re: Identifying RowID
« 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


4
ParamQuery Pro Evaluation Support / 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

Pages: [1]