47800

does jqgrid support a multiple checkbox list for editing

I am playing around with jqgrid and I want to edit a row entry. One of the cells is a list so I want some sort of multiselect editor inside a cell. i dont see support for a cell edit where i can choose multiple entries from a list. select (either multiselect list or even better a dropdown of checkboxes)

is there any support for something like this?? <img src="https://i.stack.imgur.com/KQHPm.png" alt="enter image description here">

Answer1:

see: http://www.secondpersonplural.ca/jqgriddocs/_2eb0fb79d.htm

<img src="https://i.stack.imgur.com/X2Sj5.png" alt="enter image description here">

jQuery("#grid_id").setGridParam({multiselect:true}).showCol('cb');

Answer2:

Working example:

{ name: "Id_ListaMultiple", index:"Id_ListaMultiple",editable:true,edittype:"custom",editoptions:{custom_element:multiCheckElem, custom_value:multiCheckVal,list:"2:Reposición;1:Solicitud Inicial"}},

function multiCheckElem(values, optio) { var id = optio.id; var ctl = '<div id="'+ id + '" class="checklist">'; var ckboxAry = optio.list.split(';'); var aValues = []; if (values && values.length) { aValues = values.split(","); } for (var i = 0; i < ckboxAry.length; i++) { var item = ckboxAry[i].split(':'); ctl += '<input type="checkbox" '; if (aValues.indexOf(item[0]) != -1) { ctl += 'checked="checked" '; } ctl += 'value="' + item[0] + '"> ' + item[1] + '</input><br/>'; } return ctl + '</div>'; } function multiCheckVal(elem, action, val) { var items = ''; if (action == 'get') // submitted { $("input[type=checkbox]:checked", elem).each(function (i, e) { if (items) items += "," items += e.value; }); } else // launched { } return items; }

Regards Henry

Recommend

  • Error: only defined on a data frame with all numeric variables with ddply on large dataset
  • jqGrid: reload data from json-string
  • Using the “sortGrid” method to sort a column in descending order?
  • Reset again and persist the data of JqGrid Row in Editable mode when some error return from Server
  • Prevent click event on row in jqGrid
  • Form in HTML Email Not Posting Data
  • how do I implement loops (For) in javacc
  • How to add VRI dictonary into a PDF
  • jqGrid reload doesn't work
  • Connection timeout when installing chaincode using fabric-sdk-go
  • Traverse nested dictionary from depth and move to top
  • Does Index Using a Logical Expression work for strings? [duplicate]
  • Recursive function for matrix determinant calculator
  • d3.js How to draw stacked horziontal bars from array?
  • remove strings in between lines in a file
  • python performance problems using loops with big tables
  • WCF net.tcp transport security - how to disable server certificate validation on the client
  • Mongo Index not being used
  • Can not find reason for crash test flight
  • How to change system locale in batch
  • Creating certificate using makecert without pvk file
  • OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.amazonalexa.com:443
  • iPhone — MKReverseGeocoder.adminstrativeArea — getting state abbreviation
  • CardLayout display Next panel - java Swing
  • Eclipse : Unknown Source Java SQL Exception
  • Why does _GET in PHP wrongly decodes slash?
  • cURL for Windows can't make a secure connection to the Stack API
  • Cleave.js Phone CA
  • SSLRead() return error -9806/15958)
  • What distributed message queues support millions of queues?
  • Python getting common name from URL using ssl.getpeercert()
  • does jqgrid support a multiple checkbox list for editing
  • Optimizing database types to compact database (SQLite)
  • Cross-Platform Protobuf Serialization
  • Do I've to free mysql result after storing it?
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • bootstrap to use multiple ng-app
  • How to get icons for entities from eclipse?
  • Turn off referential integrity in Derby? is it possible?
  • JaxB to read class hierarchy