1. 程式人生 > >Ext Net 1 x Ext Net GridPanel 刪除行提示

Ext Net 1 x Ext Net GridPanel 刪除行提示

               
            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>