我有一個很好的使用jQGrid進行內聯編輯的示例http://ok-soft-gmbh.com/jqGrid/TestSamle/Admin.htm 有兩個自定義操作“編輯”和“刪除”。我想再添加一個自定義內聯Action,將其命名為ToggleOnline。在此操作中,我想將網格的所有單元格發布到控制器?;旧希@將是一種編輯操作,但是它將為某些列設置一些默認值。內聯按鈕是這樣添加的:{ name: 'act', index: 'act', width: 55, align: 'center', sortable: false, formatter: 'actions', formatoptions: { keys: true, // we want use [Enter] key to save the row and [Esc] to cancel editing. delOptions: myDelOptions } }而不是添加我正在使用事件的自定義附加按鈕 loadComplete:loadComplete: function(){ debugger; var ids = jQuery("#Grid1").getDataIDs(); for(var i=0;i<ids.length;i++){ var cl = ids[i]; custom = "<input style='height:22px;width:20px;' type='button' value='E' onclick=jQuery('#Grid1').editRow(" + cl + "); />"; jQuery("#Grid1").setRowData(ids[i], { act: custom }) } } 但自定義按鈕根本沒有出現。而且我還需要某種方式來發布行數據,并且還需要指定自定義操作名稱(oper)來處理服務器上的該操作。
自定義jQGrid發布操作
慕尼黑5688855
2020-02-02 14:28:51