Ext Net 1 x Ext Net GridPanel 刪除行提示
阿新 • • 發佈:2018-12-21
var gridCommand = function (command, record) { if (command == "Users") { var id = record.data.Id; //設定編輯窗的值 Ext.net.DirectMethods.SelectedUsers(id); } if (command == "Select") { Ext.Msg.confirm('提示' , '您確定要選該培訓課程?', function (btn) { if (btn == 'yes') { Ext.net.DirectMethods.SelectCourse(record.data.Id); } }); } };
HTML:
<ext:CommandColumn Header="使用者操作" Width="200" > <Commands> <ext:GridCommand Icon="Accept" CommandName="Select" Text="選課"/> <ext:GridCommand Icon="Group" CommandName="Users" Text="已選人員"/> <ext:GridCommand Icon="UserGo" CommandName="All" Text="必修"/> </Commands> <PrepareToolbar Fn="prepare" /> </ext:CommandColumn>