Ext.Net(Coolite) 页面(js)获取控件相关值
记录....便于速查,持续更新.
1. 一般控件:#{ControlID}.getValue();
#{ControlID}.getText();
2.TreePanel获取选择的节点: #{TreePanelID}.getSelectionModel().getSelectedNode();
3.GridPanel获取选择的行(Handler、js两种写法其他地方类似):
(1) Handler里面写法如下:
#{GridPanelID}.getSelectionModel().getSelections();
获取某列的值 var rows = #{GridPanelID}.getSelectionModel().getSelections();
columnValue = rows[index].data.columnName;
(2)<script type="text/javascript"></script>里面写法如下:
Ext.getCmp('GridPanelID').getSelectionModel().getSelections();
获取某列的值 var rows = Ext.getCmp('GridPanelID').getSelectionModel().getSelections();
columnValue = rows[index].data.columnName;