Extjs dataview里面的tpl里控件的值怎么取到

2024-12-15 12:17:57
推荐回答(2个)
回答1:

最好加一个独立的方法取值,
方法中大致如下
var test=me.el.getById(me.getInputId() );

return test.dom.value

回答2:

  在new新Panel1时给Panel1.Name=“Panel1”
然后
Dim lbl As Label = Me.panel.Controls("Panel1").Controls("lableName")
lbl.Text = "Hello"
总之,如果知道你创建的控件名称,都可以通过Controls(控件名称)一层层的往下找,如果不知道控件名称,就用for each遍历
For Each c as control in Me.Panel.Controls
if TypeOf(c) is Panel then
For Each l as control in c.Controls
if TypeOf(l) is Label then
l.Text="Hello"
exit for
end if
next
end if
next