开发者

Display problem when using RowEditor extension on an ExtJS GridPanel

I'm using the RowEditor extension to edit a GridPanel. My ExtJS version is 3.3.0. I need some fields to be editable, others not no be edited at all and I do this by ignoring the editor property on those columns. The problem is that when an editor is not found, it is artificially generated in RowEditor.js this way:

for(var i = 0, len = cm.getColumnCount(); i < len; i++){
        var c = cm.getColumnAt(i),
            ed = c.getEditor();
        if(!ed){
            ed = c.displayEditor || new Ext.form.DisplayField();
        }else{
            ed = ed.field;
        }
        //uninteresting code...
        this.insert(i, ed);
    }

The dat开发者_Go百科a is double displayed because of that, as you can see in the image below.

Display problem when using RowEditor extension on an ExtJS GridPanel

Is there a quick solution to get rid of that unnecessary text but still view the existing data on the grid? Thanks in advance.


I'm going to posit, no. Not without rewriting part of the plugin. Then again, you may be able to manually loop round the controls you don't want and hide them.. but that seems wrong.

I'd honestly just do without the rowEditor plugin. It's just as simple to have 'regular' editors (probably even same code you've used to specify editors thus far).

Then, again as you've already done, you just ignore the editor option of the columns you don't need.

If you want to have a more fancy look, you could try styling your selected row (GetRowClass in Ext.NET, similar in ExtJS? Or just override the CSS class of a selected row).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜