How to get values from the currently selected row within a Ext.Net.GridPanel outside of the SelectionModel?

久未见 提交于 2019-12-04 09:09:44

You can access field of record like this

this.selModel.getSelected().data.shortcode

Unfortunately that didn't work for me:

App.GridPanel1.getSelectionModel().getSelected().data.Id

But this:

App.GridPanel1.getSelectionModel().getSelected().items[0].data.Id

This has changed in later versions of Ext.NET. To get the IDProperty of the row, notice that "getSelected()" is now "getSelection()" and the function returns an array of selected objects:

      <SelectionModel>
           <ext:RowSelectionModel runat="server">
               <Listeners>
                   <Select Handler="#{GridPanel1}.selModel.getSelection()[0].internalId" />
               </Listeners>

           </ext:RowSelectionModel>
       </SelectionModel>  
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!