jqGrid with an editable checkbox column

后端 未结 6 2290
难免孤独
难免孤独 2020-12-23 20:41

When using jqGrid how do you force a cell to load in its editable view on page load as well as when it is clicked?

If you set up \'cell editing\' like below, the che

6条回答
  •  不思量自难忘°
    2020-12-23 20:54

    This is an old one but has a lot of view so I decided to add my solution here too.

    I'm making use of the .delegate function of JQuery to create a late binding implementation that will free you from the obligation of using the loadComplete event.

    Just add the following:

    $(document).delegate('#myGrid .jqgrow td input', 'click', function () { alert('aaa'); });
    

    This will late bind that handler to every checkbox that's on the grid rows. You may have a problem here if you have more than one checkbox column.

提交回复
热议问题