linugb118--java space

          Java

          easiui2011110902

          //editor 綁定click事件
          var
          ed = $('#tt').datagrid('getEditor', { // get the editor object. index: 2, field: 'name' }); $(ed.target).bind('click', function(){ // bind the click event to editor target element. alert('clicked'); });
          //editor 綁定回車事件
           $('#ttt').datagrid('beginEdit', rowIndex);
          var ed = $('#ttt').datagrid('getEditors', rowIndex);
          for (var i = 0; i < ed.length; i++)
          {
          var e = ed[i];
          $(e.target).bind('keyup', function()
          {
          if (window.event.keyCode == 13)
          {
          alert("you check enter key");   
          }
          });
          }
          //editor綁定change 事件 
          function setEditing(tablename,rowIndex) {
                      var editors = $('#tt').datagrid('getEditors', rowIndex);
                      var priceEditor = editors[0];
                      var amountEditor = editors[1];
                      var sumcount = editors[2];
                      priceEditor.target.bind('change', function () {
                          //                calculate();
                          var sum = priceEditor.target.val() * amountEditor.target.val();
                          alert(sum);
                          sumcount.attr1.val(sum);
           
                      });
                      amountEditor.target.bind('change', function () {
                          var sum = priceEditor.target.val() + amountEditor.target.val();
                          alert(sum);

                      });

          posted on 2011-11-09 14:53 linugb118 閱讀(292) 評(píng)論(0)  編輯  收藏


          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           

          My Links

          Blog Stats

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 富源县| 邛崃市| 沾益县| 巫溪县| 新田县| 福泉市| 泽库县| 邵东县| 师宗县| 河津市| 莱阳市| 通渭县| 承德县| 汾阳市| 麦盖提县| 安新县| 台北市| 大兴区| 五家渠市| 康乐县| 商城县| 安国市| 佛学| 托克逊县| 宝兴县| 辽阳市| 丽江市| 永新县| 时尚| 西昌市| 新河县| 瑞金市| 沐川县| 紫云| 池州市| 淮阳县| 海南省| 六盘水市| 仁布县| 湘阴县| 湘潭市|