确定是否有任何行绑定的最佳实践是什么?
目前,我正在使用客户端 OnDataBound 事件,代码类似于以下:
gridDataBound: function (event)
{
var rows = $('tbody tr:has(td)', this);
if (rows.length == 0 || (rows.length == 1 && rows[0].innerText == "No records to display'))
$('#GridSection').hide("slow");
}
一定有更好的方法!