-2

How do I set the delete button in just a few lines?

My list is returned by json and some records do not need the delete button. How do I remove it from PHP?

Thks.

EDITED

I SOLVED

 loadComplete: function () {
    var rowIds = jQuery(grid_selector).jqGrid('getDataIDs');
    for (i = 0; i <= rowIds.length; i++) {//iterate over each row
        rowData = jQuery(grid_selector).jqGrid('getRowData', rowIds[i]);
        if (rowData['id'] == true) { 
            $("#jDeleteButton_"+rowIds[i]).hide();
        } 
     } 
  }

1 Answers1

1

You can use free jqGrid, it's the fork of jqGrid, which I develop. I supports isDisplayButtons callback of formatter: "actions", which you can use to inform jqGrid about the rows, which can be deleted. See the demo created for the answer.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798