1
私は剣道TreeListを持っている:剣道TreeListカスタムcreateChildコマンドの行のインデックスを取得する方法を
{
command: [
{
name: "Edit",
imageClass: "fa fa-pencil"
},
{
name: "Delete",
imageClass: "fa fa-trash"
},
{
name: "createChild",
imageClass: "fa fa-plus"
}
], title: "Actions", width: "300px"
}
私は、子供のボタンを作成し、入力に私のデータをクリックし、「更新」をクリックしてください。私は新しい行の行インデックスを取得する必要がありますが、私はそれを行うための正しい方法を見つけるように見えることはできません。この時点で
create: function (e) {//Called when the create child command is saved
//Collect the data needed for the save
}
:これは私の剣道のdataSourceの「作成」の定義に私を取ります。私はのようなもの試してみた:
$(e.target).closest("tr").parent().index()
をしかし、それは-1
を与え、:
var selectedRow = $scope.treelist.select();
var node = $scope.treelist.dataItem(selectedRow);
しかし、ノードが
任意のアイデアを定義されていませんか?
これはまさに私が必要としているようです。ありがとうございました。 – vincentvanjoe
@vincentvanjoe大歓迎です! – DontVoteMeDown