easyui-datagrid 列单击事件


首先要注意的就是,先添加一个js方法,名字可以自定义,但是必须得与下面的option里面的onClickRow:后面的一致即可
    
<script type="text/javascript">
        function ClickRow(rowIndex, rowData) {
            //            alert('这是Name:' + rowData.Name + '这个是ID:' + rowData.ID);            
            if (rowData.ModuleModel == 'DDS3366L') {
                document.getElementById("Archives").src = "real-time/ArchivesForE_P.aspx?ModuleID=" + rowData.ID;
            }
        } 
    </script>
 
在table的option里头加上OnClickRow方法
<table id="List" class="easyui-datagrid" title="字典类型列表" style="width: 310px; height: 800px;
            margin: 0 0 0 0; float: left;" data-options="rownumbers:true,fitColumns:true,pagination:true,pageSize:20,pagePosition:'top',onClickRow:ClickRow,striped:true,singleSelect:true,url:'dit_Itemlist.aspx?from=sel'">
            <thead>
                <tr>
                    <th data-options="field:'BookName',sortable:true,width:80,align:'center'">
                        名称
                    </th>
                </tr>
            </thead>
        </table>





免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM