1

グリッドパネルでextjsを使用して1つのエディターグリッドパネルを作成しました。デフォルトでは、列はテキストフィールドとともに読み込まれます。

var Grid= new Ext.grid.EditorGridPanel({
    store:checkpoint,
    renderTo:'testgrid',
    autoHeight:true, 
    border:false,
    clicksToEdit: 1,
    columns: [ {header:'Check Points',
                 menuDisabled: true,
             dataIndex: 'checkpoints',
             valueField:'Id',
             width:300,
            },
             {
                 menuDisabled: true,
                 header:'Report',
                 dataIndex: 'developerreport',
                 renderer:  function (v,p) {
                     p.attr += ' ext:qtip=" click to edit"';
                     return v; 
                   } ,

                 editor:  new Ext.form.ComboBox({

                    hideTrigger: true, 
                    name: 'comment',
                    id:'comment',
                    mode: 'local',
                    store: names,
                    displayField: 'role',
                    triggerAction: 'all',
                    emptyText:'Select Role',
                    allowBlank:     false,
                    editable:       false,
                    forceSelection: true}),},
                   {header:'Comment',
                     menuDisabled: true,
                     dataIndex: 'developercomment',
                     renderer:  function (v,p) {
                        p.attr += ' ext:qtip=" click to add"';
                         return v;
                      } ,

                     editor: new Ext.form.TextField({
                        }),}],
              viewConfig: {
                    deferEmptyText: false,
                    forceFit: true,
                    emptyText: '<p style="font-size: 13px;color:red;">Please fill the above details</p>',
                    },

                });

コメントフィールドをテキストボックスと一緒にロードしたいのですが、方法はありますか

前もって感謝します

4

1 に答える 1

0

EditorGridPanelAFAIKは一度に1つのエディターをサポートするため、すぐにそれを行うことはできません。おそらく最も簡単な解決策は、コンテンツをHTMLとしてレンダリングするレンダラーを作成inputし、その入力にイベントを添付することです。applyToconfigプロパティを使用して、HTML入力ごとにコンポーネントを作成することもできます。

使用する作業サンプル:http applyTo//jsfiddle.net/N2wYX/6/

于 2012-09-17T12:13:49.183 に答える