当前位置: 首页 > 工具软件 > Yako.js > 使用案例 >

Ext.Net(Coolite) 页面(js)获取控件相关值

周通
2023-12-01

  记录....便于速查,持续更新.

     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;

转载于:https://www.cnblogs.com/yako/archive/2011/07/28/2119066.html

 类似资料: