开发者

How to highlight an item of a list in sencha ExtJS ?

开发者 https://www.devze.com 2023-02-22 16:58 出处:网络
I want to highlight a par开发者_如何学JAVAticular item after loading the list in sencha. I think we need to do something with the tpl of thelist.So how is it possibe?If you are using Ext.list.ListView

I want to highlight a par开发者_如何学JAVAticular item after loading the list in sencha. I think we need to do something with the tpl of the list.So how is it possibe?


If you are using Ext.list.ListView or its parent Ext.DataView, use getNode() to get the HTML element that you want to highlight, then highlight it.

Something like:

var node = list.getNode('something');
Ext.fly(node).highlight();


In ExtJS 4.1.1 or newer you can use component method setHighlightedItem(item) for that purpose.

0

精彩评论

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