我用ajax提交数据后,gridview中模板列的控件__doPostBack回发就失效了,
前台代码:
$.ajax(
{
type: 'POST',
url: 'xinghao.aspx',
//async: false,//异步的话则注释
data: { 'strAction': 'dlg', 'bj_cid': DataKeyName, 'Sel': value },
success: function (res) {
var dvGrid = $(res).find("#dvGrid").html();
$("#dvGrid").html(dvGrid);
}
})
通过html中返回代码
<table cellspacing="0" cellpadding="4" rules="cols" id="gridXh" style="color:Black;background-color:White;border-color:#DEDFDE;border-width:1px;border-style:None;width:100%;border-collapse:collapse;">
<tbody><tr style="color:White;background-color:#5D7B9D;border-style:Solid;font-weight:bold;height:20px;">
<th scope="col"> </th><th scope="col">型号</th>
</tr><tr style="color:#333333;background-color:#F7F6F3;">
<td class="grid_style" align="center" style="width:2%;">
<input id="gridXh_chk_0" type="checkbox" name="gridXh$ctl02$chk">
</td><td class="grid_style" ondblclick="javascript:__doPostBack('gridXh$ctl02$ctl00','2')" style="width:10%;cursor:pointer;cursor:hand;">
<span id="gridXh_lb_2_0">1×1</span>
</td>
</tr>
</tbody></table>