Author Topic: Issue with row edit  (Read 2007 times)

stevejacobsen

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 46
    • View Profile
Issue with row edit
« on: September 17, 2016, 08:17:52 am »
I'm trying to use the code in the row editing demo but the buttons don't seem to do anything when I click on them. I noticed that the code references a pencil-icon. My buttons don't display the pencil-icon like the demo does.

Quote
{title: "", editable: false, minWidth: 165, sortable: false,
            render: function (ui) {
                return "<button type='button' class='edit_btn'>Edit</button>\
                                <button type='button' class='delete_btn'>Delete</button>";
            },
            postRender: function (ui) {
                var rowIndx = ui.rowIndx,
                        grid = this,
                        $cell = grid.getCell(ui);
                           //delete button
                $cell.find(".delete_btn").button({icons: {primary: 'ui-icon-close'}})
                        .bind("click", function (evt) {

                            deleteRow(rowIndx, grid);
                        });

                //edit button
                $cell.find(".edit_btn").button({icons: {primary: 'ui-icon-pencil'}})
                        .bind("click", function (evt) {
                         
                            if (isEditing(grid)) {
                                return false;
                            }
                            editRow(rowIndx, grid, true);
                        });

                //if it has edit class, then edit the row.
                if (grid.hasClass({rowData: ui.rowData, cls: 'pq-row-edit'})) {
                    editRow(rowIndx, grid);
                }
            }
        }

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Issue with row edit
« Reply #1 on: September 17, 2016, 08:49:20 am »