0

jquery easy ui crud データグリッドを使用しており、列の 1 つにコンボ ボックスが必要です。コンボ ボックスにデータが入力されましたが、項目を変更する必要がある場合は、ボックスをフィルター処理できるようにする必要があります。

私の質問のパート 2 は、ID からボックス内の実際のテキストにコンボで値を設定できなかったことです。IDはLinkin Parkの15488です。IDではなくLinkin Parkを表示したい

コンボ ボックスのソース データは、すべてのアーティストを選択して配列に配置し、json にエンコードする php スクリプトです。

データグリッドのコードはこちら

<table id="dg" title="Tracklisting" style="width:1000px;height:250px"
        toolbar="#toolbar" pagination="true"
        rownumbers="true"  singleSelect="true">
    <thead>
        <tr>
            <th field="TRACK NO" width="50" editor="{type:'validatebox',options:{required:true}}">ID</th>
            <th field="DISC NO" width="50" editor="{type:'validatebox',options:{required:true}}">CAT No</th>
            <th field="TRACKTITLE" width="50" editor="{type:'validatebox',options:{required:true}}">Track No</th>
            <th field="VERSION" width="50" editor="text">Title</th>
            <th field="ARTIST_ID_1" width="100"  editor="{type:'combobox',options:
{valueField:'ID',textField:'ARTIST',url:'get_artist.php',required:true}}">Artist</th>
        </tr>
    </thead>
</table>
4

1 に答える 1

0

2 番目の質問への回答:

formatter="JS_function"

この JavaScript 関数を使用すると、グリッドで選択した値のテキストを表示するために呼び出されます。1問目を詳しく教えてください。

于 2013-01-23T10:25:20.517 に答える