2016-12-22 9 views
1

jQwidgetsグリッドビューを作成していて、データを入力しています。ここでjQwidgets - グリッドビューのボタンセルがクリックされましたが、行選択をトリガーしません

{ text: 'Action', datafield: 'Action', width: widthInStr, cellsrenderer: editButtonFunc } 

editButtonFuncされています:

私はボタンとして作られているセルを持つ

var editButtonFunc = function(){ 
      return '<input type="button" onClick="showEditInventoryScreenFunction()" class="gridButton" value="Edit/Audit Log"/>'; 
     }; 

私が欲しいのボタンは、この関数を呼び出すために行選択イベントをトリガーするためにクリックされたときに、 :

showEditInventoryScreenFunction = function(){ 

      $("#jqxgrid").on('rowselect', function (event) { 

       var row = event.args.rowindex; 
       var datarow = $("#jqxgrid").jqxGrid('getrowdata', row); 

       console.log(datarow); 

       var itemId = datarow.Action; 

       console.log(itemId); 

       inventoryController.inventoryEditItems(selector, data1, data2, itemId); 

      }); 
     }; 

これで、ボタンをクリックすると、行または列を選択すると何も起こりませんもう一度ボタンを押すと、jqxgrid onclick関数がアクティブになります。

ボタンをクリックすると、jqxgrid onclick関数を有効にしたいと思います。

答えて

0

ボタンクリックを処理する方法を示すjQWigetsグリッドのサンプルがあります。あなたが見るかもしれないjQwidgets Grid Popup Editing

関連する問題