ASP.NET ZERO 学习 JTable的使用子表闭合功能

双击子表自动判定开闭功能

//CHILD TABLE DEFINITION FOR "PHONE NUMBERS"
Phones: {
title: '',
width: '5%',
sorting: false,
edit: false,
create: false,
display: function (studentData) { var $img = $('<img src="/Content/images/Misc/phone.png" title="Edit phone numbers" />'), //Create an image that will be used to open child table
parentTable = $("#StudentTableContainer"); //Open | Close child table when user clicks the image
$img.click(function(){ var tr = $(this).parents("tr"),
isChildRowOpen = parentTable.jtable("isChildRowOpen", tr ); if( isChildRowOpen ){
$( parentTable.jtable("getChildRow", tr ) ).slideUp();
return;
} // some another code
}
}
}
上一篇:Flex timer使用 keydown事件注册到stage


下一篇:性能优化工具 MVC Mini Profiler