The completely custom oper example.
Select some rows and give it a shot.

Please note the server-side price validation.
Пример создания нестандартной пользовательской операции.
Выберите несколько рядов и задайте им цену.

Обратите внимание на валидацию данных на стороне сервера при помощи исключений.
<?php

class jqOperCustom extends jqGrid
{
    protected function init()
    {
        $this->options = array('multiselect' => true,);

        $this->table = 'tbl_books';

        #Set columns
        $this->cols = array(
            'id' => array('label' => 'ID',
                'width' => 10,
                'align' => 'center',
                'formatter' => 'integer',
            ),

            'name' => array('label' => 'Name',
                'width' => 40,
            ),

            'price' => array('label' => 'Price',
                'width' => 15,
                'formatter' => 'integer',
            ),
        );
    }

    protected function opPrice()
    {
        $price = intval($this->input('price'));

        if($price < 1 or $price > 3000)
        {
            throw new jqGrid_Exception('Incorrect price!');
        }

        foreach($this->input['id'] as $id)
        {
            $this->DB->update($this->table, array('price' => $price), intval($id));
        }
    }
}
<script>
    <?= $rendered_grid ?>

    //custom button
    $grid.jqGrid("navButtonAdd", pager,
        {
            caption:"Change price",
            title:"Custom oper",
            icon:"ui-icon-flag",
            onClickButton:function () {
                var price = prompt("Enter new price.\Number between 1 and 3000");
                if (!price) return;

                $(this).jqGrid("extRequest",
                    {
                        "oper":"price", //oper name
                        "price":price    //and other values
                    },
                    {
                        'selrow':true   //add selected rows to request
                    });
            }
        });
</script>