小编Li0*_*liQ的帖子

在ExtJS中突出显示/选择网格行

我是Ext JS的新手.我正在使用一个网格面板,当我选择/单击任何行时,与网格下面的面板中显示与所选行相关的某些数据.此外,当窗口加载时,默认情况下应选择/突出显示第一个窗口.目前,网格和面板正确显示.甚至与所选行相关的数据也会显示在面板中,但行不会突出显示.我已经尝试了grid.focusRow(0)&grid.getRow(0).highlight()方法,但它们没有用.以下是我的代码.

//the js file code
initComponent : function() { //within the window instance

    var single = false;
    var store = new Ext.data.XmlStore({//all necessary fields added}); //store
    HttpUtil.syncCall(this.url, "GET", this.loadStore, store,this);
    var acctTplMarkup = [//the fields here are displayed on row selection ];
                /*The template for displaying the details of the selected row */
                 this.acctTpl = new Ext.Template(acctTplMarkup);
    //check for request type, if type is range of checks create the grid
    if (single == false) { …
Run Code Online (Sandbox Code Playgroud)

javascript grid extjs

7
推荐指数
2
解决办法
4万
查看次数

如何从javascript覆盖html元素?

我有一些带有HTML元素的HTML页面ID="logo".我需要创建JS脚本(没有外部libs调用),用其他HTML元素覆盖该html元素"<div id=logo> stuff inside </div>".

html javascript dom

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

javascript ×2

dom ×1

extjs ×1

grid ×1

html ×1